clc; clear; close all;[A] = imread('Img0010.jpg');%%
% segment the entire fruit
[BW,maskedRGBImage] = createMask2(A);% color image
[BWfilled,properties] = filterRegions2(BW);%%% segment defect
[BWd,df] = segmentImage21(maskedRGBImage);% defect properties
statsd = regionprops(BWd, 'Area');statsF = regionprops(BWfilled, 'Area');AreaD = cat(1,statsd.Area);AreaF = cat(1,statsF.Area);percDef = 100*AreaD/AreaF;%%% featureextraction (texture)
% Create the Gray Level Cooccurance Matrices (GLCMs)
gray = rgb2gray(A);% Create the Gray Level Cooccurance Matrices (GLCMs)glcms = graycomatrix(gray);% Derive Statistics from GLCM
stats = graycoprops(glcms,'Contrast Correlation Energy Homogeneity');Contrast = stats.Contrast;Correlation = stats.Correlation;Energy = stats.Energy;Homogeneity = stats.Homogeneity;%%% featureextraction (color)
Mean = mean2(maskedRGBImage);Standard_Deviation = std2(maskedRGBImage);Entropy = entropy(maskedRGBImage);RMS = mean2(rms(maskedRGBImage));%%% feature variables
Ex = [Contrast Correlation Energy Homogeneity Mean Standard_Deviation Entropy RMS];xlswrite('C:\Users\nazem_000\Desktop\fotos\healthy\healthy1.xls',Ex);
MATLAB: I want to extra featuresglcm from 100images in a folder and save in excell,i have tried different ways but i only get results for the first iamge
fruitimage processingimage segmentation
Related Question
- What mean entropy – what mean value output
- I am not getting the BoundingBox
- How can i separate all the connected regions in a binary image and display them individually.
- I m new to glcm and neural network… what i want to know that i have excracted features through glcm now i want to add these features to neural network how can i do this
- Get eccentricity and metric values images
Best Answer