I have a problem about read an image to matrix. Plz Someone can help me!
I have a problem about read an image to matrix. Plz Someone can help me!
Announcements - General Programming Boards
Announcements - C++ Programming
Announcements - General Programming Boards
You should read this as well.
How To Ask Questions The Smart Way
Yes we can help (probably), but you need to show more effort than "gimmetehcodez".
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I have an image with 100x100. I want to read it to matrix. I read some infomation from web pages but not found that I need. Do you know a libary function can resole this problem?? I'm studying c++ programming
Can you open and close the file?
Can you write the code to Hex Dump the data?
If you can do these things, then we don't need to tell you about how to open/read/close files, because you can do that much yourself.
Have you written any code to deal with declaring a matrix?
- as a 2D array (C style)
- as a vector<vector> of some type (C++ style)
If you can do these things, then we don't need to tell you about these either
Which kind of image file is it? There are many -> Image file formats - Wikipedia, the free encyclopedia
In other words, you need to write some code up to the point you get stuck, and then ask a specific question about what happens next.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I studied techniques programming
I can open and write the text file, do operation on 2d array...
I want to read an image as *.jpg,..
I will write the code in c++, when I added a path of image file, then I press enter, It's show 2d array as interger about information of it.
Finally, I will use it for some other case.
Last edited by sukuku; 10-03-2011 at 08:46 AM.
Then you'll want to use a library to do all the low-level math (or high-level math, depending on your point of view).
libjpeg - Wikipedia, the free encyclopedia
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.