フィルターのクリア

What is wrong with this code?

1 回表示 (過去 30 日間)
Avinash Bhatt
Avinash Bhatt 2019 年 5 月 2 日
I am using mkpp() command to construct the polynomial of 'cameraman.tif' but getting the error-
"Error using mkpp (line 62)
The requested number of polynomial pieces, 3, is incompatible with the proposed size, [1],
of a coefficient and the number, 1, of scalar coefficients provided."
MATLAB code
clc
close all
clear all
% Read an image
X=imread('cameraman.tif');
figure,imshow(X);
[r c noc]=size(X);
% Gray Scale Conveersion
if noc > 1
Xn=rgb2gray(X);
else
Xn=X;
end
% Extracting Histogram from image
figure,imhist(X);
% Extracting pixel intensity values
i=1;
while i ~= 256
for j=1:c
z=X(i,j);
disp(z);
end
i=i+1
end
breaks=[70 80 90 100]
%for b=1:z
% X(b)=X(b)+1;
% disp(X(b));
%end
pp=mkpp(breaks,X(i,j));
Please help me to rectify the error.

回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by