How to get an image and do some processing ?

6 visualizaciones (últimos 30 días)
Arshia Saffari
Arshia Saffari el 22 de Ag. de 2021
Comentada: Arshia Saffari el 22 de Ag. de 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.

Respuesta aceptada

Image Analyst
Image Analyst el 22 de Ag. de 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.
  1 comentario
Arshia Saffari
Arshia Saffari el 22 de Ag. de 2021
oh yeah. It worked. Thanks. I'm definitely going to take a look at that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by