Sum modified laplacian operator

16 Ansichten (letzte 30 Tage)
Psk
Psk am 22 Okt. 2020
Kommentiert: KSSV am 22 Okt. 2020
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?

Antworten (1)

KSSV
KSSV am 22 Okt. 2020
Bearbeitet: KSSV am 22 Okt. 2020
for p = 2:255
for q = 2:255
% do what you want
end
end
  4 Kommentare
Psk
Psk am 22 Okt. 2020
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 am 22 Okt. 2020
Then you resize your image into 258*258..

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by