I need help guys.. Please if someone can provide me matlab code for my research paper. This is link to my paper http://was​et.org/pub​lications/​17107

Actually, I have only 3 days left, and if I will not complete this , I will loose my 1 year, and I will have to wait for more than one year for my registration. I am very new to matlab but still I am trying since 10days, but I am not able to do this. I have done only this much of part of code...
m1=imread('abc2.jpeg');
m2=im2double(rgb2ycbcr(m1));
sample1=m2(:,:,1);
sample1_mean=mean(mean(sample1))
%Binarizing Samples area
BINsample1=im2bw(sample1,sample1_mean);
imshow(BINsample1);
%Removing noise
L=medfilt2(BINsample1,[3,3]);
figure, imshow(L)
%normailzation of image
gemiddeld=mean2(L)
standaard_afwyking=std2(L)
NormalizedArray = (L-gemiddeld) ./ standaard_afwyking;
GS = NormalizedArray ./ max(NormalizedArray(:))-min(NormalizedArray(:));
NormArrayU8 = uint8(255*(NormalizedArray+ 3)./6)
figure, imshow(GS);
%thinning of an image
%
BW2 = bwmorph(GS,'thin')
figure, imshow(BW2);
Thanks , Thanks in advance.

6 Commenti

What difficulty are you encountering with the code you have? Are you getting an error message?
No I am able to code only the first part i.e.image pre-processing. In rest of the part I am getting error
What error message are you encountering? What is your code for the rest ?
this is my code for image partitioning into blocks-
blockSizeR = 150; % Rows in block.
blockSizeC = 100; % Columns in block.
% Figure out the size of each block in rows.
% Most will be blockSizeR but there may be a remainder amount of less than that.
wholeBlockRows = floor(rows / blockSizeR);
blockVectorR = [blockSizeR * ones(1, wholeBlockRows), rem(rows, blockSizeR)];
% Figure out the size of each block in columns.
wholeBlockCols = floor(columns / blockSizeC);
blockVectorC = [blockSizeC * ones(1, wholeBlockCols), rem(columns, blockSizeC)];
% Create the cell array, ca.
% Each cell (except for the remainder cells at the end of the image)
% in the array contains a blockSizeR by blockSizeC by 3 color array.
% This line is where the image is actually divided up into blocks.
if numberOfColorBands > 1
% It's a color image.
ca = mat2cell(rgbImage, blockVectorR, blockVectorC, numberOfColorBands);
else
ca = mat2cell(rgbImage, blockVectorR, blockVectorC);
end
% Now display all the blocks.
plotIndex = 1;
numPlotsR = size(ca, 1);
numPlotsC = size(ca, 2);
for r = 1 : numPlotsR
for c = 1 : numPlotsC
fprintf('plotindex = %d, c=%d, r=%d\n', plotIndex, c, r);
% Specify the location for display of the image.
subplot(numPlotsR, numPlotsC, plotIndex);
% Extract the numerical array out of the cell
% just for tutorial purposes.
rgbBlock = ca{r,c};
imshow(rgbBlock); % Could call imshow(ca{r,c}) if you wanted to.
[rowsB columnsB numberOfColorBandsB] = size(rgbBlock);
% Make the caption the block number.
caption = sprintf('Block #%d of %d\n%d rows by %d columns', ...
plotIndex, numPlotsR*numPlotsC, rowsB, columnsB);
title(caption);
drawnow;
% Increment the subplot to the next location.
plotIndex = plotIndex + 1;
end
end
Just attach your script please. And also attach your image so we can run it. And what are you trying to do, other than display the blocks and thinning each block? Why are you trying to thin? Do you know that you will have bad edge effects at the block boundaries if you are thinning?

Accedi per commentare.

Risposte (0)

Richiesto:

il 6 Gen 2014

Commentato:

il 6 Gen 2014

Community Treasure Hunt

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

Start Hunting!

Translated by