How do I recognize rectangles with OpenCV
[OpenCV] Recognize simple objects?
following problem that I could use (and would be immeasurably grateful for) help with:
With the help of a Kinect, objects are to be recognized in an area of a defined size. These are largely circular discs of a fixed size and color. Some of them are just flat, others can have any shape that does not exceed the edge of the disc and has a maximum height. The background also has clearly defined colors; There are several of these, however, which contrast strongly with the color of the panes.
The Kinect camera is attached at a fixed height, but can be moved in the plane above the scan area. The task now is to use the known position of the Kinect camera to determine the exact coordinates x and y of all disk objects from a corner of the scan area to be defined as the point of origin.
I have already determined the position of the target objects on the camera image by first transferring the image to the HSV area, then running a threshold filter over it, which gives me exactly the necessary color angle of the targets as white (the rest black) . Unfortunately, there is also some background noise from objects of similar color outside the scan area.
The algorithm for finding the objects basically works like this:
The image is traversed pixel by pixel. If a pixel is found that is not equal to black (0), a recursive FloodFill is carried out at that point. The minimum and maximum x and y coordinates of the FloodFill algorithm then result in the boundary of the object found. A simple plausibility check (minimum and maximum height / width of the determined rectangle) then clearly filters out objects that are too small and too large. The rest is mainly the slice you want.
Long story short: I would like to optimize the algorithm described. There are certainly faster ways to find white objects of a certain shape (elliptical, because a circular disc filmed from the side from an acute angle) but of unknown size in an otherwise black image, right?
For information: we use Ubuntu, OpenCV and Freenect.
I would be extremely grateful for any tip.
- Deceive all car dealerships
- How did Nero treat Jews and Christians
- Does Facebook really respect the GDPR?
- Guadalajara is much cheaper than Mexico City
- What is Delhi Quote in NEET
- How do I know a solid match
- Why do Jamaicans eat ackee
- America has reached the greatest political divide
- Why are social media platforms dying out
- How does the MusiXmatch Android app work
- How are gay men treated in Mexico
- How do I talk to ghosts
- Can there be a godless religion
- Which is the best smartphone among 15,000 1
- What are functional requirements
- Is there a calculator in the computer
- Which is the best hotel in Roorkee
- What does bhishma mean
- Why is tobacco not banned in India?
- What is Muehlenholz
- What is the double slit experiment
- What are some fun band photoshoot ideas
- Are electric cars practical
- Forgiveness is a virtue of the weak