Image processing system generator model,neural network

creating blocks in simulink using xilinx blocksets
455 Downloads
Updated 5 Mar 2015

View License

This is the model which I have created for testing a neural network...where constant ,constant1,constant2 ,etc are the inputs for the model.weights i have collected from matlab execution.These inputs are the major axis,minor axis ,aspect ratio and area of an image.last one is bias value.Can any1 tell me is this model is correct. How do I create system generator blocks for feeding these inputs using image not manually.I mean pre processing and extracting those four shape features.
[f,p] = uigetfile('*.jpg;*.bmp');
I = imread([p f]);
a = imresize(I,[256 256]);
%% shape
im=a;
figure(1)
subplot(2,3,1); imshow(im),impixelinfo;
title('original image');
ValRL1=140;
ValRH1=250;
ValGL1=22;
ValGH1=150;
ValBL1=20;
ValBH1=100;
Iy=(im(:,:,1)>ValRL1)&(im(:,:,2)>ValGL1)&(im(:,:,3)>ValBL1) & (im(:,:,1)<ValRH1)&(im(:,:,2)<ValGH1)&(im(:,:,3)<ValBH1);
subplot(2,3,2); imshow(Iy),impixelinfo; title('binary image');
Iy = imfill(Iy,'holes');
Iy=bwareaopen(Iy,250);
subplot(2,3,3); imshow(Iy);
title('binary image');
[r,c]=find(Iy);
majoraxis=max(c)-min(c);
minoraxis=max(r)-min(r);
Aspectratio=majoraxis/minoraxis
[Label,Total]=bwlabel(Iy,8);
num=1;
Parameter=regionprops(Label,'all');
Obj_area1=Parameter(num).Area

Cite As

shalini c (2024). Image processing system generator model,neural network (https://www.mathworks.com/matlabcentral/fileexchange/49926-image-processing-system-generator-model-neural-network), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0