augmented reality - OpenCV: Detect a black to white gradient in an area -
I've uploaded an example image to better understand:
In the image you have a few scanlines and one You can see the marker (white latte length with circle in it) I want to go OpenCVi with a specific area (for example, in the trough underlined trough) which should be around 5x5. If there is a black-colored shield in that area, then I want OpenCV to save the situation in that area so that I can work with it later.
The difference between the end result marker will be different retagles, different trough black and white lines.
Is such a thing possible? I forgot a lot but I got only the edge detectors but it is not what I want, I just need to check the black gradient.
Thanks in advance.
It would be nice to filter some areas by calculating your histogram. If you can use cvCalcHist for the job, you can set some thresholds to determine whether the black-white pixel percentages correspond to a gradient. This work will not solve, but it will help you to reduce the complexity.
Then, you can erase the image to merge all the white areas. After applying thresholds, it is possible to use connected components (CVFID contours) which will separate the images in black zone or white zones. Then you can find out the gradient through finding 5x5 areas, which will consist of a white area and a piece of black area together.
Hope it helps
Comments
Post a Comment