필터 지우기
필터 지우기

image pixel value multiplication with constant using customized multiplier function

조회 수: 1 (최근 30일)
I wrote a matlab code for a 16 bit multiplier, the function name is mul_16b_mari, checked its functionality and worked fine. I have to use this multiplier to perform image pixel multiplication with an constant 3. I tried by using the code which is given below but didn't work and got the error subscripted assignment dimension mismatch. Can someone help me to rectify this issue. The input image size is 512x512x3. The size of each pixel is 8 bit. I tried with an image of 16 bit pixel size too but got the same error.
clc;
clear all;
tic;
I = imread('image_output.bmp');
figure;
%imshow(I);
[m n]=size(I);
%I=im2double(I);
for i=1:m
for j=1:n
u=3;
b(i,j)=mul_16b_mari(I(i,j),u)/65535;
%b(i,j)=1-cos(b(i,j))/2;
%mse=(1/(300*270))*(I(i,j)-b(i,j))^2;
end
end
  댓글 수: 2
KSSV
KSSV 2017년 6월 8일
Error could be in this function _mul_16b_mari, but it is not shown here??
Adam
Adam 2017년 6월 8일
Should be obvious if you use the debugger with a breakpoint on the line that your error message presumably points to, but which you didn't share with us.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by