The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy.
1 | initial version |
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy.
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy.Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.As computer vision practitioners have already guessed, the pictures presented are the best. Just turn it 40 degrees and the perfect result goes bust. Detecting contours works better, but it is rather time-consuming. It produces many duplicates. I tried Canny only. You see that many squares are lost because their contours were rejected. If I replace
by
they appear and the central knot may be detected.
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.As computer vision practitioners have already guessed, the pictures presented are the best. Just turn it 40 degrees and the perfect result goes bust. Detecting contours works better, but it is rather time-consuming. It produces many duplicates. I tried Canny only. You see that many squares are lost because their contours were rejected. If I replace
by
they appear and the central knot may be detected.Not only the functions used, but also their sequence matters. Initially, I converted color image to gray, then fed it to Canny. squares.cpp hints another approach. We can extract separate channels, apply Canny, then mix results. Almost perfect edges make it possible to reconstruct 3 necessary lines.
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.As computer vision practitioners have already guessed, the pictures presented are the best. Just turn it 40 degrees and the perfect result goes bust. Detecting contours works better, but it is rather time-consuming. It produces many duplicates. I tried Canny only. You see that many squares are lost because their contours were rejected. If I replace
by
they appear and the central knot may be detected.Another shortcoming of contours. Probably they are the best for this concrete task, but I hope that my program will work for other boxes too. They have no squares. The typical pattern is lines of text intermingled with some pictures. I still believe that line detection has perspectives. Not only the functions used, but also their sequence matters. Initially, I converted color image to gray, then fed it to Canny. squares.cpp hints another approach. We can extract separate channels, apply Canny, then mix results. Almost perfect edges make it possible to reconstruct 3 necessary lines.
6 | retagged |
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.As computer vision practitioners have already guessed, the pictures presented are the best. Just turn it 40 degrees and the perfect result goes bust. Detecting contours works better, but it is rather time-consuming. It produces many duplicates. I tried Canny only. You see that many squares are lost because their contours were rejected. If I replace
by
they appear and the central knot may be detected.Another shortcoming of contours. Probably they are the best for this concrete task, but I hope that my program will work for other boxes too. They have no squares. The typical pattern is lines of text intermingled with some pictures. I still believe that line detection has perspectives. Not only the functions used, but also their sequence matters. Initially, I converted color image to gray, then fed it to Canny. squares.cpp hints another approach. We can extract separate channels, apply Canny, then mix results. Almost perfect edges make it possible to reconstruct 3 necessary lines.