how to repair the error of read multiple images in one folder and proceed directly to the background removal stage and generate fractal dimension values from those images

조회 수: 2(최근 30일)
Frisda Sianipar
Frisda Sianipar 2021년 2월 15일
댓글: Frisda Sianipar 2021년 2월 16일
%-Read Folder
clear all;
image_folder = 'F:\kuliah\semester6\TA2\Implemen';
filenames = dir (fullfile(image_folder, '*.jpg'));
total_images = numel(filenames);
for n = 1:total_images
f = fullfile(image_folder, filenames(n) .name);
our_images = f;
figure (n)
%-Remove Background
citra= our_images ;
% figure, fig1=imshow(citra);
load mri
V = squeeze(citra);
% To search fractal dimension
citra4= our_images;
figure, fig1=imshow(citra4);
[n, r] = fboxcount(citra4,'slope');
df = -diff(log(n))./diff(log(r));
disp(['Df= ' num2str(mean(df(4:8)))]);
Error using montage
Expected input number 1, I, BW, or RGB, to be one of these types:
uint8, double, uint16, logical, single, int16
Error in montage>parse_inputs (line 239)
validateattributes(I, ...
Error in montage (line 168)
Error in penggabungan (line 29)

채택된 답변

Image Analyst
Image Analyst 2021년 2월 15일
What are you trying to do with loading mri, and with montage? montage wants a variable full of images or image names. What are you doing with the squeeze and reshape?
  댓글 수: 4

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by