Ask Your Question

Revision history [back]

drawContours from dataset

Hi,

I got a dataset (from excel csv file). I need to draw contours from this data set.

Basically, i can read the data file, and create an array of data either one or two dimensional array.

The confusing part is: input for drawContours is a list of MatOfPoint. MatOfPoint is in fact a list Point. Each point will require the x and y coordinate. However, in my data set, each point is a value. I don't know how to make it become a Point. Because we can convert from x and y coordinate to a value (length of the vector) but i can't convert from value to vector.

Could you help me out? this is done in java. assume my data

row1: |4, 5, 6, 7, 8, 8 |
row2: |5, 5, 0, 0, 0, 0|

....

thank you for your help,

Long

click to hide/show revision 2
retagged

updated 2017-01-24 21:38:34 -0600

berak gravatar image

drawContours from dataset

Hi,

I got a dataset (from excel csv file). I need to draw contours from this data set.

Basically, i can read the data file, and create an array of data either one or two dimensional array.

The confusing part is: input for drawContours is a list of MatOfPoint. MatOfPoint is in fact a list Point. Each point will require the x and y coordinate. However, in my data set, each point is a value. I don't know how to make it become a Point. Because we can convert from x and y coordinate to a value (length of the vector) but i can't convert from value to vector.

Could you help me out? this is done in java. assume my data

row1: |4, 5, 6, 7, 8, 8 |
row2: |5, 5, 0, 0, 0, 0|

....

thank you for your help,

Long

drawContours from dataset

Hi,

I got a dataset (from excel csv file). I need to draw contours from this data set.

Basically, i can read the data file, and create an array of data either one or two dimensional array.

The confusing part is: input for drawContours is a list of MatOfPoint. MatOfPoint is in fact a list Point. Each point will require the x and y coordinate. However, in my data set, each point is a value. I don't know how to make it become a Point. Because we can convert from x and y coordinate to a value (length of the vector) but i can't convert from value to vector.

Could you help me out? this is done in java. assume my data

row1: |4, 5, 6, 7, 8, 8 |
row2: |5, 5, 0, 0, 0, 0|

....

thank you for your help,

Long