Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

i want to concatenate local geometric mean and take histogram for it. Is it possible?

1 visualización (últimos 30 días)
%my code
mean1 = imfilter(grayImage, Q1) / (middleRow * middleColumn);
mean2 = imfilter(grayImage, Q2) / (middleRow * middleColumn);
mean3 = imfilter(grayImage, Q3) / (middleRow * middleColumn);
mean4 = imfilter(grayImage, Q4) / (middleRow * middleColumn);
I cant able to view the image after concatenation. after concatenation i m getting in dimension of 128x 128. but i need a single mean value. What should i do?
  2 comentarios
Shan Sha
Shan Sha el 20 de Sept. de 2018
can i concatenate the following mean value and take hitogram for it? i have to concatenate this hist with other features histogram. is it possible? but the dimensions of both hitogram are different? how can i match the dimension size code for mean is given below
function M = meant(inputImage,windowWidth)
[rows, columns, numberOfColorChannels] = size(inputImage);
% Set up the four quadrant masks.
middleRow = ceil(windowWidth/2);
middleColumn = middleRow;
% first initialize all 4 quadrant kernels to all zeros.
Q1 = zeros(windowWidth, windowWidth);
Q2=Q1;
Q3=Q1;
Q4=Q1;
% Next set the appropriate quadrants to 1.
Q1(1:middleRow, 1:middleColumn) = 1;
Q2(middleRow:end, 1:middleColumn) = 1;
Q3(1:middleRow, middleColumn:end) = 1;
Q4(middleRow:end, middleColumn:end) = 1;
% Need to handle gray scale images and color images differently. if numberOfColorChannels == 1 % Input image is a gray scale image. grayImage = inputImage; end % [minSDImage, quadrantLocations] = min(SD, [], 3); % Note: we do not use the minSDImage image and you can use ~ instead of it if you wish.
if numberOfColorChannels == 1 % Scan the image with each Q and get the means of each of the 4 quadrants. mean1 = imfilter(grayImage, Q1) / (middleRow * middleColumn); mean2 = imfilter(grayImage, Q2) / (middleRow * middleColumn); mean3 = imfilter(grayImage, Q3) / (middleRow * middleColumn); mean4 = imfilter(grayImage, Q4) / (middleRow * middleColumn);
M = cat(3, mean1, mean2, mean3, mean4); end end

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by