MATLAB: Obtain all Data Cursor Values

boundary recognitionimage processing

Hello,
I've been a long time MatLab user but at a basic level only. I am trying to do some image analysis which will utilize a webcamera to capture some images. These images will then go under boundary recognition which will provide me with a figure of where the boundary was found. Specifically, the objective is to detect flowers and weeds. I was able to find references online on how to do this and found a file on exchange which allows me to obtain the boundaries. However, I am unable to get the data points of these boundaries. For example, MatLab is able to plot the boundary of a flower and display the boundary only on a white background. How do I go about obtaining the x and y coordinates of the entire boundary into the workspace? I need to do this so that I can determine the exact location the flower was found and can then send the signal to arduino. Which brings me to my second question: how do I interface MatLab with Arduino? I found the ArduinoIO package on the mathworks site – is that all I need?

Best Answer

regionprops() can do it, as can bwboundaries()