Hey guys, I want to divide a black and white image 320px by 240px vertically and then count up the black pixels where the output is the % of black pixels in each of the 2 image segments. So far I have this
[filename pathname] = uigetfile('*.jpg', 'Choose Image');
imageLocation = strcat(pathname, filename);
blackWhiteImage = im2bw(imread(imageLocation), 0.5);
splitImage = imdivide(blackWhiteImage,2);
totalNumberOfPixels = 120*160;
numberOfBlackPixelsLeft = sum(sum(splitImage == 0));
set(handles.console, 'string', percentBlackPixelsLeft);
I am new to matlab and I need some help with that, any help would be greatley appriciated :)))
Best Answer