Class CCheckerDetector
java.lang.Object
org.opencv.core.Algorithm
org.opencv.objdetect.CCheckerDetector
A class to find the positions of the ColorCharts in the image.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CCheckerDetector__fromPtr__(long addr) static CCheckerDetectorcreate()Returns the implementation of the CCheckerDetector.static CCheckerDetectorSet the net which will be used to find the approximate bounding boxes for the color charts.Gets the reference color for chart.booleanbooleanFind the ColorCharts in the given image.booleanFind the ColorCharts in the given image.booleanprocessWithROI(Mat image, MatOfRect regionsOfInterest) Find the ColorCharts in the given image.booleanprocessWithROI(Mat image, MatOfRect regionsOfInterest, int nc) Find the ColorCharts in the given image.voidSets the detection paramaters for mcc.voidsetUseDnnModel(boolean useDnn) Enables or disables the use of the neural network for detection.Methods inherited from class Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
Constructor Details
-
CCheckerDetector
protected CCheckerDetector(long addr)
-
-
Method Details
-
__fromPtr__
-
processWithROI
Find the ColorCharts in the given image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker()- Parameters:
image- image in color space BGRregionsOfInterest- regions of image to look for the chart, if it is empty, charts are looked for in the entire imagenc- number of charts in the image, if you don't know the exact then keeping this number high helps.- Returns:
- true if atleast one chart is detected otherwise false
-
processWithROI
Find the ColorCharts in the given image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker()- Parameters:
image- image in color space BGRregionsOfInterest- regions of image to look for the chart, if it is empty, charts are looked for in the entire image then keeping this number high helps.- Returns:
- true if atleast one chart is detected otherwise false
-
process
Find the ColorCharts in the given image. Differs from the above one only in the arguments. This version searches for the chart in the full image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker()- Parameters:
image- image in color space BGRnc- number of charts in the image, if you don't know the exact then keeping this number high helps.- Returns:
- true if atleast one chart is detected otherwise false
-
process
Find the ColorCharts in the given image. Differs from the above one only in the arguments. This version searches for the chart in the full image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker()- Parameters:
image- image in color space BGR then keeping this number high helps.- Returns:
- true if atleast one chart is detected otherwise false
-
create
Returns the implementation of the CCheckerDetector.- Returns:
- automatically generated
-
create
Set the net which will be used to find the approximate bounding boxes for the color charts. And returns the implementation of the CCheckerDetector. It is not necessary to use this, but this usually results in better detection rate.- Parameters:
net- the neural network, if the network in empty, then the function will return false.- Returns:
- automatically generated
-
getRefColors
-
setDetectionParams
Sets the detection paramaters for mcc.- Parameters:
params- DetectorParametersMCC structure containing detection configuration parameters.
-
setUseDnnModel
public void setUseDnnModel(boolean useDnn) Enables or disables the use of the neural network for detection.- Parameters:
useDnn- Boolean flag to indicate whether to use neural network (true) or not (false).
-
getUseDnnModel
public boolean getUseDnnModel() -
getDetectionParams
-