フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
Shan Sha
Shan Sha 2018 年 9 月 20 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
%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 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 9 月 20 日
Can you provide more detail?
Shan Sha
Shan Sha 2018 年 9 月 20 日
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

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by