ROI of the raw event data

ROI of the raw event data

Dear Sir or Madam,
Greetings!

I am trying to use event camera to build data set. And I want to reduce the memory size of the event data by restricting the ROI. I use the following command to set the ROI. The problem is that it seems the area out of the ROI still stores the non-event (number 0) and the height and width of the recorded raw data didn't change. How can I reduce the height and width (resolution) of the recorded raw event data from 1280*720 to 640*360? 

    # set ROI if specified
    if i_roi is not None:
        if args.roi_file:
            roi = get_roi_from_file(args.roi_file)
            wind_obj = device.get_i_roi().Window(roi['x'], roi['y'], roi['width'], roi['height'])
            #wind_obj = device.get_i_roi().Window(320, 180, 640, 360)
            device.get_i_roi().set_window(wind_obj)
            device.get_i_roi().enable(True)

Best regards,
Haoqi