How to get an image and do some processing ?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Arshia Saffari
am 22 Aug. 2021
Kommentiert: Arshia Saffari
am 22 Aug. 2021
Hi. I want to get an image from the user and do some work on it. This code is what I put together from the internet and my own knowledge( which is not much).
[Picture_Orignal_Name,Picture_Orignal_Path] = uigetfile('*.bmp','Select an image');
uiopen(fullfile(Picture_Orignal_Path,Picture_Orignal_Name),1);
Lets say I have a file named 'Render1.bmp'. after using that code there is a variable named 'Render1' and its value is 1280x1280x3 uint8. in Command Window I could type something like
A = Render1(:,:,1);
but it's a script and I don't know the file name. It is in Picture_Orignal_Name but I wasn't able to make any use of that.
I would like to know if there is a way to use Picture_Orignal_Name to work on that variable and if there is a better way to do it in the first place.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 22 Aug. 2021
You would not do this:
uiopen(fullfile(Picture_Orignal_Path,Picture_Orignal_Name),1);
You would do
fullFileName = fullfile(Picture_Orignal_Path,Picture_Orignal_Name);
rgbImage = imread(fullFileName);
I suggest you start with my Image Segmentation Tutorial in my File Exchange:
It goes over the basics of reading in an image, thresholding it to find blobs, making measurements on the blobs, and filtering those measurements to find subsets of blobs meeting certain criteria.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!