how to remove padarray from image?

Risposte (2)

A = magic(4)
n = 2
B = padarray(A,[n n]) % pad
A2 = B(n+1:end-n,n+1:end-n) % unpad
or directly:
A2 = A
Image Analyst
Image Analyst il 8 Feb 2016

0 voti

Simply don't call it. Why did you call it if you don't want what it does?

2 Commenti

i an new to matlab. just learning how things work.
Like Jos says, you can just extract the central part with indexing:
out = yourArray(2:end-1, 2:end-1);

Accedi per commentare.

Categorie

Scopri di più su Image Processing and Computer Vision in Centro assistenza e File Exchange

Richiesto:

il 8 Feb 2016

Commentato:

il 8 Feb 2016

Community Treasure Hunt

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

Start Hunting!

Translated by