MATLAB Answers

Saving images to a folder

조회 수: 1(최근 30일)
Benjamin Currie
Benjamin Currie 2021년 2월 26일
댓글: KALYAN ACHARJYA 2021년 2월 26일
Hi, I have created a while loop to perform filtering on images and then semantic segmentation. They are over 1000 images and I am wanting to save the filtered image and segmented image seperatley into a folder. Currently i have it showing each one and then changing to the next image to be analysed. Below is my code so far (without any saving just displaying image). Z is the filtered image and R is the image after semantic segmentation. I also need to save each image as its current name, so in the 'RobotImages' folder each photo has a special name with x,y and theta values that I will be using later on for localisation. Any help is accpreciated.
S = 0;
N = 1281;
while(S < N)
I = read(RobotImages);
B = rgb2gray(I);
J = imnoise(B, "salt & pepper", 0.02);
Z = medfilt2(J);
imshow(Z)
C = semanticseg(Z, net);
R = labeloverlay(I, C, 'colormap', cmao, 'Transparency', 0.4);
imshow(R)
S = S + 1;
end
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 2월 26일
There are many threads related to the same question, please see the link below

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

답변(0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by