Shape Detection

Anyone know of a plugin or Xojo code to detect shapes within a picture?
Needs to be compatible on Windows and Mac.

Really I’m only looking for rectangles.

Hm…sounds suspiciously like Machine Learning. You might want to check out Jim Meyer’s Xojo session from XDC 2019. You need an internet connection to use the cloud AI.

Apple has some ML classes but no idea what MS is offering, if anything.

@Bob Keeney I don’t think that would work for this specific application. I’m thinking it’s almost an extension of OCR. Should not be overly complex, I just don’t want to reinvent the wheel.

What do you want exactly?
Detect rectangle in what kind of picture?

Eric, I will have a grid of rectangles, mostly the same size. I just need to determine their coordinates.
It will be photographic, so I cannot count on perfect pixel matching color in each rectangle, nor perfectly straight edges. But both should be close.

Check CIDetectorMBS and CIRectangleFeatureMBS classes for MacOS.

Chris, could you post a sample picture and the result for that picture?