how to convert picturs into matrix

Dear readers, I am new in matlab and I would want to know how to convert an image in a matrix of columns? Or to convert the matrix square in matrix column?

댓글 수: 4

What exactly is "an image"? Do you mean a 3D RGB array, an image file or a real-world painting?
What is a "matrix of columns" or a "matrix column"? Perhaps you want:
img = img(:);
krak
krak 2013년 4월 23일
I have an image of type jpg, an image taken with a sails photo, I already have make the segmentation. Now the image is black and white, I want to convert he in a vector of columns! I hope that I am clear!
Image Analyst
Image Analyst 2013년 4월 23일
Clear? Not really. You accepted the answer below though, so we assume you are done. I never did figure out how you able to perform image segmentation on the image before you even had the image in MATLAB as a 2D image array, but whatever.... Jan's code tells you how to convert the 2D grayscale image or 3D color image into a 1D column vector, though I don't know how or why that would be useful to you. If you have any questions on image segmentation, see my image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
krak
krak 2013년 5월 2일
Thank you! I use matlab to make a program of Hand Gesture Recognition Using Neural Networks (just the alpahbet)! I am not expert matlab thus I try I have to make a program that he can recognize the signs of the hearing-impaired people! Thank you and I hope to find of the help

댓글을 달려면 로그인하십시오.

 채택된 답변

Chandrasekhar
Chandrasekhar 2013년 4월 23일

0 개 추천

use the command imread('img.jpg'). This will convert the image into a matrix

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2013년 4월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by