Skip to main content

Posts

Blog Post 2

Debugging the RDP Algorithm   The Problem Even though we had the proper input for the RDP algorithm, we weren't getting useful or consistent results from it. This was partially due to our not knowing the algorithm very well, but even when we managed to understand enough to see what it was supposed to be doing, we found that it wasn't performing correctly. We consistently got results that varied between runs and were impossible for a given shape because there were either no lines or far too few to actually make up the shape. After checking the logic of the algorithm numerous times with as many sources as we could, in addition to going over the code with a fine toothed comb, we found nothing out of place or wrong. It was only at that point that we decided it would be worthwhile to check what the contoured image actually looked like and see what was happening. The Hunt   It turned out that the cv2.blur() function we were using to simulate the effect
Recent posts

First Algorithm Implementation

The Ramer Douglas Peucker Algorithm: We decided to use the Ramer Douglas Peucker algorithm in order to perform shape recognition. This algorithm takes a set of points as an input and attempts to extrapolate away all extraneous points and reduce the number of points down to the essentials that make up the shape. The idea behind using this algorithm for our project was to see if we could find a range of points that generally characterizes certain shapes. In other words, if we could determine that a general sphere could be made up by, say, five points after being refined to no longer contain extraneous points, we could set that as a known value for spheres and recognize all shapes with five points as spheres.    Wikipedia     However, we ran into some trouble actually using this algorithm because we needed contours, or lists of points, to run through the algorithm. Because contour detection isn’t something we planned to have implemented yet, we are currently using OpenC