How to correctly read the data from an image .dat file?
Mostra commenti meno recenti
I have a .dat file created by a C++ code segment. The format of the dat file is as per these guidelines: http://users.iit.demokritos.gr/~nstam/ICDAR2013HandSegmCont/Protocol.html
This is the image file:

And here is the dat file for the above image : https://www.dropbox.com/s/q8h3psin2k67vew/color_test.dat
I can tell that the segmented words in the dat file are store in the same format as the bwlabel command would do.
But how do I get the data from the dat file into an array in Matlab for further processing? Suppose the first word is labeled with 1 and the second word with 2. How do I get the 1 to a different array and the 2 to a separate array and so on. Such that I can further work on that array such as imshow or im2bw or even regionprops?
I tried fopen and fread. They did manage to open the file but created a single column vector having 8000+ elements.
thank you
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
