Unrecognized function or variable 'overload'. Error in repmat (line 13) b = overload(mfilename, a, m, n);
이전 댓글 표시
After opening Matlab, I am getting following error.
Unrecognized function or variable 'overload'.
Error in repmat (line 13)
b = overload(mfilename, a, m, n);
Error in matlab.supportpackagemanagement.internal.util.getInstalledSpPkgProducts (line 34)
packages = repmat(struct('BaseCode', '', ...
Error in matlab.supportpackagemanagement.internal.getInstalledSupportPackagesInfo (line 12)
packages = matlab.supportpackagemanagement.internal.util.getInstalledSpPkgProducts();
After running following script, getting error:
% Read the input image
inputImage = imread('FLIR0003.jpg'); % Replace 'your_image.jpg' with the path to your image
% Convert the input image to double precision
inputImage = double(inputImage);
% Compute color channels (R, G, B)
R = inputImage(:,:,1);
G = inputImage(:,:,2);
B = inputImage(:,:,3);
% Compute intensity (luminance)
I = (R + G + B) / 3.0;
% Compute color and intensity contrast
RContrast = abs(R - I);
GContrast = abs(G - I);
BContrast = abs(B - I);
% Combine color and intensity contrast to get saliency map
saliencyMap = (RContrast + GContrast + BContrast) / 3.0;
% Normalize the saliency map to the range [0, 1]
saliencyMap = (saliencyMap - min(saliencyMap(:))) / (max(saliencyMap(:)) - min(saliencyMap(:)));
% Display the original image and the saliency map
% subplot(1, 2, 1);
figure
imshow(inputImage);
title('Original Image');
%subplot(1, 2, 2);
% figure
imshow(saliencyMap, []);
title('Saliency Map');
Error-
Unrecognized function or variable 'overload'.
Error in repmat (line 11)
b = overload(mfilename, a, m);
Error in gobjects (line 94)
array = repmat(matlab.graphics.GraphicsPlaceholder(),dims);
Error in title (line 40)
hSub = gobjects(size(targets));
Error in sal_test (line 30)
title('Original Image');
댓글 수: 3
"After running following script, getting error:"
There's nothing in the script that would generate the errors you got.
I am running your script with a sample image and it works properly, see below.
Importantly - What did you name your script?
% Read the input image
in = imread('peppers.png'); % Replace 'your_image.jpg' with the path to your image
% Convert the input image to double precision
inputImage = double(in);
% Compute color channels (R, G, B)
R = inputImage(:,:,1);
G = inputImage(:,:,2);
B = inputImage(:,:,3);
% Compute intensity (luminance)
I = (R + G + B) / 3.0;
% Compute color and intensity contrast
RContrast = abs(R - I);
GContrast = abs(G - I);
BContrast = abs(B - I);
% Combine color and intensity contrast to get saliency map
saliencyMap = (RContrast + GContrast + BContrast) / 3.0;
% Normalize the saliency map to the range [0, 1]
saliencyMap = (saliencyMap - min(saliencyMap(:))) / (max(saliencyMap(:)) - min(saliencyMap(:)));
% Display the original image and the saliency map
% subplot(1, 2, 1);
figure
imshow(in);
title('Original Image');
%subplot(1, 2, 2);
% figure
imshow(saliencyMap, []);
title('Saliency Map');
Sujata Pathak
2023년 9월 14일
Dyuman Joshi
2023년 9월 14일
Is the code you have posted above the whole code?
If not, then post the whole code.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

