I am surprised that I'm having difficulty with what seem to be very simple modules. The problems are with the Calculate_Distance and If_Statement.
In the attached robofiles, Calculate_Distance and the If_Statement work as expected in test_dist1.rbo, but do not work as expected in spectra_101.rbo.
In test_dist1.rbo, you click around the image window, and if you draw a long arrow, the screen text says "long", if you draw a short arrow, the screen text says "short". Great, simple, just as expected. The length of the arrow is determined by Calculate_Distance, and the test for long vs. short is done with the If_Statement.
In spectra_101.rbo, I attempt to find the area and centroid of a white rectangular blob (those work fine), then I calculate the centroid's deviation from an expected position (does not work) and check that the blob area meets a minimum criteria (does not work). The deviation always comes back 133.124 regardless of the blob centroid, and the area test fails even though, for example, an area of 5682 is greater than 4000.
I hope I'm not overlooking something simple.