How can I add pixels to an image?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Princess Aldovino
il 6 Set 2015
Commentato: Princess Aldovino
il 8 Set 2015
Good day. I'm working on a signature verification system and I've encountered a problem, can anyone help me? I am trying to add pixels to my current image so that when i warp the signature, it would would still be whole. This is my cropped image
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148789/image.jpeg)
Then when we warped it, it looks like this,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148790/image.jpeg)
Some points are gone which would surely make verification less effective.
I wanna add pixels so it would like this,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148792/image.jpeg)
(just edited with paint) This would then produce a warped image like the one shown below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148793/image.jpeg)
Also if you can suggest a better method to warp the signature for a more reliable verification would surely help. Thank you and I'm hoping you can help me.
0 Commenti
Risposta accettata
Image Analyst
il 6 Set 2015
The function padarray() in the Image Processing Toolbox does exactly that.
m = randi(255, 5, 5)
mPadded = padarray(m, [2, 2])
In the command window:
m =
97 19 174 94 224
203 152 113 203 183
192 160 23 2 129
167 35 111 65 16
33 6 181 84 31
mPadded =
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 97 19 174 94 224 0 0
0 0 203 152 113 203 183 0 0
0 0 192 160 23 2 129 0 0
0 0 167 35 111 65 16 0 0
0 0 33 6 181 84 31 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!