CaptureImage.extractRoiWithColor Method¶
Module: CaptureImage
Definition¶
Extracts a region of interest in the image according to the given bounds.
extract_roi_with_color(self, bounds: Rectangle, color_red: int, color_green: int, color_blue: int) -> CaptureImage
Parameters
bounds
Rectanglein Bounds of the crop to extract.color_red
intin Background color red (from 0 to 255)color_green
intin Background color green (from 0 to 255)color_blue
intin Background color blue (from 0 to 255)
Returns
The extracted region of interest.
Exceptions
An error has occurred during Devices Library execution.
CaptureImage extractRoiWithColor(Rectangle bounds, int colorRed, int colorGreen, int colorBlue)
Parameters
bounds
Rectanglein Bounds of the crop to extract.colorRed
intin Background color red (from 0 to 255)colorGreen
intin Background color green (from 0 to 255)colorBlue
intin Background color blue (from 0 to 255)
Returns
The extracted region of interest.
Exceptions
An error has occurred during Devices Library execution.
public CaptureImage ExtractRoiWithColor(Rectangle bounds, int colorRed, int colorGreen, int colorBlue)
Parameters
bounds
Rectanglein Bounds of the crop to extract.colorRed
intin Background color red (from 0 to 255)colorGreen
intin Background color green (from 0 to 255)colorBlue
intin Background color blue (from 0 to 255)
Returns
The extracted region of interest.
Exceptions
An error has occurred during Devices Library execution.
public CaptureImage extractRoiWithColor(Rectangle bounds, int colorRed, int colorGreen, int colorBlue) throws DevicesException
Parameters
bounds
Rectanglein Bounds of the crop to extract.colorRed
intin Background color red (from 0 to 255)colorGreen
intin Background color green (from 0 to 255)colorBlue
intin Background color blue (from 0 to 255)
Returns
The extracted region of interest.
Exceptions
An error has occurred during Devices Library execution.
int id3DevicesCaptureImage_ExtractRoiWithColor (
ID3_DEVICES_CAPTURE_IMAGE hCaptureImage,
const id3DevicesRectangle * sBounds,
int colorRed,
int colorGreen,
int colorBlue,
ID3_DEVICES_CAPTURE_IMAGE hCaptureImageRoi)
Parameters
hCaptureImage
ID3_DEVICES_CAPTURE_IMAGEin Handle to the CaptureImage object.sBounds
const id3DevicesRectangle *in Bounds of the crop to extract.colorRed
intin Background color red (from 0 to 255)colorGreen
intin Background color green (from 0 to 255)colorBlue
intin Background color blue (from 0 to 255)hCaptureImageRoi
ID3_DEVICES_CAPTURE_IMAGEout The extracted region of interest.
Returns