Module ImageProcessing

ImageProcessing.background_computation(video, params)[source]

Compute background image to eventually subtract

Parameters:
  • video – analysed video object

  • color_choice – type of image color (RGB,HSV,gray)

Returns:

image of background

Return type:

array

ImageProcessing.background_computation_fullProcess(video, params)[source]

Compute background image to eventually subtract, function used with a full process.

Parameters:
  • video – analysed video object

  • color_choice – type of image color (RGB,HSV,gray)

Returns:

image of background

Return type:

array

ImageProcessing.crop(image_in, params)[source]

Crop frame as a function of the defined ROI

Parameters:
  • im_in – image to process

  • ROI – pixel of the transformed ROI

Returns:

cropped image

Return type:

array

ImageProcessing.im_proc(im_in, params, mask_in, projective_matrix, size_processed, Ht)[source]

Process one image, change color, transform as a function of homography.

Parameters:
  • im_in – image to process

  • color_choice – type of image color (RGB,HSV,gray)

  • transformation – type of homography

  • before – detection on transformed image (True/False)

  • active_mask – use of mask (True/False)

  • noise_filtering – filter image with a gaussian convolution (True/False)

  • noise_size – size of the filter in pixel

  • mask_in – mask defined by user

  • projective_matrix – matrix defining the homography

  • size_processed – size of the image after processing

  • Ht – array with the shift to transformed coordinate to positive ones.

Returns:

image processed

Return type:

array

ImageProcessing.initialize_image_processing(video, param)[source]

Initialize image processing. Provide the resolution of transformed image and transform the first image.

Parameters:
  • video – analysed video object

  • ROI – pixel of the transformed ROI

  • window_frame – temporal windows of analysis (in frame number)

  • frame_step – number of frame interval for the analysis

  • transformation – type of homography

  • before – detection on transformed image (True/False)

  • original_type – type of image

Returns:

number of image to analyse

Return type:

int

Returns:

first processed image

Return type:

array

ImageProcessing.process_image_processing_all(video, param)[source]

Process all selected images. Available for step-by-step analysis.

Parameters:
  • video – analysed video object

  • background_image – use of background (True/False)

Returns:

stack of processed images

Return type:

list of array