CIDetector does not detect rectangles in graphic image, only in real-world photo

263 Views Asked by At

I am attempting to detect rectangles in an image that is a screen shot of an app, but have been unable to have CIDetector detect the rectangles within that image. Yet my same code, that is based on various tutorials and documentation elsewhere, and threads here, the exact same code will find rectangles in a photo, but does not detect a rectangle in a screen shot captured from a running app.

I've searched through the threads here and did see one similar question where someone was attempting to achieve what I am in my app, they were attempting to use CIDetector to detect rectangles in a raster computer-gerenated image as opposed to trying to detect a rectangle in a real-world photograph. And the response in that thread was to use real world objects.

Obviously, my intent is to detect rectangles in the screen shot, not a real-world photo. Can CIDetector be configured, and/or can the screen shot be manipulated in some way to detect the rectangles in the screen shot? If not, is there another method that can be used to achieve this?

I can post my code and the images that I am using if that will be helpful.

Any insight or suggestions are greatly appreciated.

Thanks in advance!

0

There are 0 best solutions below