How to convert image into matrix
조회 수: 104 (최근 30일)
이전 댓글 표시
Dear readers, i am new to matlab and want to learn how to convert or represent a picture in bmp or jpeg format in matrix form so that manipulations can be carried out on it. your suggestions will be worth for me..
suyash bhardwaj
댓글 수: 0
답변 (5개)
Andreas Goser
2012년 4월 27일
If you import a picture, it is actually a matrix, so I am not sure what do are looking for. Try:
imdata = imread('ngc6543a.jpg');
댓글 수: 6
Soma Debnath
2016년 8월 25일
I am very new to MATLAB,so i have no idea that how to create and load training dataset of images in matlab?please write the corresponding code also.
snehal jaipurkar
2016년 10월 24일
Dis is really helpful. I thanks experts for their support to beginners like usus.
Omar Omari
2019년 1월 31일
hi readers
How can I take a picture from a camera my labtop and draw it into matrices and vice versa
Thanks
댓글 수: 0
keerthana reddy
2019년 2월 14일
편집: DGM
2024년 4월 23일
x=dicomread('i2.jpg');
imshow(i2);
댓글 수: 2
Walter Roberson
2021년 12월 9일
dicomread() is only for use with files stored in dicom format. There is no official file extension for dicom files but most people use .dcm or .dicom as the extension. In theory a file named with .jpg could be in dicom format instead of jpeg format, but the attached file is jpeg format not dicom format.
DGM
2024년 4월 23일
As Walter said, the file is a JPG, not a DICOM file. Surprisingly, dicomread() only returns a warning and an empty array.
x = dicomread('i2.jpg');
whos x
What's been missed is that x is never actually used. When imshow() is called, it's given the filename prefix as if it's a variable, even though it is neither a variable, nor a valid filename. Obviously, the result is going to be an error.
You can read pedestrian images with imread(). You can pass either a variable or a filename to imshow().
inpict = imread('i2.jpg');
imshow(inpict)
uroog fatima
2021년 12월 9일
i need a command to convert encrpted image to matrix.can anybody tell me.
댓글 수: 1
Walter Roberson
2021년 12월 9일
No, we cannot help you with that. Due to the laws of the United States, we are not permitted to discuss encryption or decryption algorithms (except under narrow circumstances that are a nuisance to go through, requiring obtaining permission in advance from a government department.)
samitha chathuranga
2024년 4월 23일
How to Design a communication system that uses digital modulation and channel coding with an LDPC code to simulate the transmission of digital images over an additive white Gaussian noise (AWGN) channel.
댓글 수: 1
DGM
2024년 4월 23일
This is not an answer, so it doesn't belong here as an answer.
If you want to ask a question, please post a new question using the "Ask" button at the top of the page.
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
