how to write a .dat file in matlab?
Mostrar comentarios más antiguos
i have the 1000 training images and 100 test images. i need to read all and save in the .dat file and use in the vc++. if there is any alternate technique to read the images . please share your ideas with me.
thanks
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 17 de Abr. de 2013
0 votos
.dat includes any binary format. You can use fwrite() to store binary data.
You may need to invent a binary protocol to signal image size and number of bits per pixel.
When you store the images in binary, keep in mind that MATLAB's internal order is "down the columns", whereas C++'s internal order is "across the rows".
2 comentarios
preet
el 18 de Abr. de 2013
Walter Roberson
el 18 de Abr. de 2013
And in the loop you would use imread()
Jan
el 17 de Abr. de 2013
0 votos
This is a very general question, which cannot be answered precisely. It is a good strategy to use an established format to store pictures in, while inventing a new .dat format willwaste a lot of time. You are asking for an "alternate technique to read images" - alternate to what?
1 comentario
preet
el 18 de Abr. de 2013
Categorías
Más información sobre Data Import and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!