Sum modified laplacian operator

9 次查看(过去 30 天)
Psk
Psk 2020-10-22
评论: KSSV 2020-10-22
ML(p, q) =| 2I(p, q) − I(p − 1, q) − I(p + 1, q) | + | 2I(p, q) − I(p, q − 1) − I(p, q + 1) | (2.2.6) where, I(p,q) denotes the pixel value located at the position (p,q).
My Image I is of size 256x256. To implement the above line, I am getting a zero index error as I have choosen p=1:256 and q=1:256. How to avoid getting a zero index error?

回答(1 个)

KSSV
KSSV 2020-10-22
编辑:KSSV 2020-10-22
for p = 2:255
for q = 2:255
% do what you want
end
end
  4 个评论
Psk
Psk 2020-10-22
But in that case that will be a deviation from the original formula. That is if i don't use (p-1) and q-1 for first and last index.
KSSV
KSSV 2020-10-22
Then you resize your image into 258*258..

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by