I am currently on a project where we have people place sticky notes on a X-Y axis to plot their beliefs on certain topics. These sticky notes can be of different colors to reflect different levels of their beliefs. What we are then left with is a picture that we take of the various plots to base our findings on.

I am hoping to avoid plotting each point individually in a data frame based on the picture. I am also relatively new to utilizing machine learning, specifically in relation to image recognition. I have done a couple of random forest projects, but nothing image processing related.

My question is this, using R, is it possible to use a machine learning package to read these pictures and create a data frame of X-Y coordinates of these sticky notes plots?

I am open to all suggestions. Thanks for any and all help and let me know if you need any clarification.

Edit: Here is an example of what one of the images might look like. Unfortunately, I could only quickly find an X-axis only graph, but we do X and Y-axis graphs as well.

enter image description here

  • 2
    $\begingroup$ Machine learning could do this but there are much better ways to achieve this with more traditional computer vision techniques, could you post a photo as an example? $\endgroup$ Sep 2, 2016 at 15:01
  • $\begingroup$ @JanvanderVegt I have edited my question to include an example image. $\endgroup$
    – medavis6
    Sep 2, 2016 at 15:16
  • $\begingroup$ So the sticky notes are all the same shape? $\endgroup$ Sep 2, 2016 at 17:24
  • $\begingroup$ That is correct. They might vary in color, but the shape should remain consistent. $\endgroup$
    – medavis6
    Sep 2, 2016 at 17:31
  • $\begingroup$ Nice question - it should be fun to try to make such a tool. For a few pictures you should be able to do it easily with a graphics editor (photoshop / gimp). And an unrelated note: when people see each other's votes, you get information cascades en.wikipedia.org/wiki/Information_cascade... $\endgroup$
    – Valentas
    Sep 6, 2016 at 11:31

1 Answer 1


Learning means you have examples of a complex behavior and can learn the dependency of the behavior on some parameters implicitly.

In your picture, one can see the dependency rather explicitly and the dependency is rather simple: A big black disk for every sticky-note.


  • Take picture data (red, green, blue and each 0..255) and for each pixel calculate total squared difference to a black disk of exactly the same diameter as the black dots in the picture (sum differences for each color). This means you compute the difference pixelwise and then square it pixelwise and then add up over the area of the disk.
  • Find local minima of these differences below a threshold.
  • The positions of these local minima are the desired positions.

Unfortunately I'm not good enough in R but I believe it can be done in a few lines if loops exist in R.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.