I need to turn a sketch of a Finite-State Machine, specifically a sequence recognizer, into a VHDL/Verilog code.
The first step is just identifying the independent objects in the image, Circles, Arrows, Characters.
Luckily I can assume that these objects will be a few pixels apart, I want to be able to group consecutive black pixels (after turning the image from colored to black-and-white) into individual objects so I can draw a bounding box around them so I can later see what objects are inside what objects.
My question is how can I do this in OpenCV, is there an easier way than just simply scanning the image pixel by pixel and grouping black pixels?
So I pretty much want to end up with this or something similar: