I want to identify squares/rectangles inside my UIImageView
(or UIImage
).
I looked at "Very simple image recognition on iOS", but that's not quite what I'm looking.
At the moment I have an UIImageView
which is given a UIImage
from time to time.
Most of the UIImage
es has black squares/rectangles like this:
.
But the corners may (or may not) have rounded edges.
How can I identify the first black square/rectangle's size?
The end result would be to resize my UIImageView
to make the first black square in the UIImage
fill the screen. Like so: