read .txt file and convert in to MAT
I am a beginner to openCV and I have a .txt file which contains the map data of x and y in the format of [x:y] = [1:3, 3:5, 5:7, 8:9, 10:5, 7:3, ...... ] where the data before : is x and after : is y and how do I convert the data of x as row and y as column and write the above values in to the mat using OPENCV. any help would be appreciated.
it's unclear, what you try to do with it. what is this for ?
are there really only coordinates in your txt file ?
Yes the coordinates are stored in the above format I have to places this coordinates in the mat format and check for the values of x and y is in the path of travel for the path planning algorithm.
maybe you could highlight, how your Mat should look like ? (why a cv::Mat, even ?)
this unfortunately does not make any sense to me. you have a series of points there, not a 2d distribution of "values" (there are no values)
again, what is it for , why do you need a cv::Mat for it ?