# how to do image transformation using distortion algorithm?

조회 수: 4 (최근 30일)
soruba 2014년 12월 30일
답변: Valeriy 2020년 1월 14일
I need to do a biometrics project by trnaforming the image using distortion algorithm. please provide me algorith and matlab coding for distortion algorithm

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

### 답변 (3개)

Image Analyst 2014년 12월 30일
See my attached demo. You can have it correct for both barrel and pincushion distortion.
##### 댓글 수: 0이전 댓글 -2개 표시이전 댓글 -2개 숨기기

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

Valeriy 2020년 1월 11일
@ImageAnalyst, thanks for your demo, it is clear and shows main principle of distortion compensation. I need to realize such compenstaion not for a few points, but for complete image. Of cource, it is possible to repeated such compensation for each pixel of final image, but, perhaps, is (are?) in Matlab functions that realize such operation in more efficient way?
By the way, I already many times used your efficient and valuable help with my issues and questions. Is it possible to express my appreciation of it to Matlab authorities?
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Image Analyst 2020년 1월 14일
You're welcome Valeriy. You can send an email to chenlin at mathworks dot com if you want the staff at Mathworks to know. Chen Lin, Ned Gulley (gulley at mathworks.com), David Wey, and John Kelly are some of the staff involved with the Answers forum of the MATLAB Central community.
What I do for background correction is to take a blank shot (no objects in the scene) and then fit a smooth 2-D 4th order polynomial to the surface. This will ignore small noise pixels and give you the smooth pattern due to the combination of lens shading and lighting non-uniformity. I'm attaching a demo. You'll need to download John D'Errico's polyfitn() function for 2-D polynomial fit from the File Exchange.

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

Valeriy 2020년 1월 14일
Thanks a lot, Image Analyst for your code and information. It is very related to my current project: I need to process microscopy image (measured), which needs such background intensity correction, as well as some dust subtraction. I'm doing this by FFt processing of "blank" shot, its low frequency FFT component I use as illumination distribution, intensity, while
dust = blank - intensity
and as processed image, (processed) I use
processed = (measured - dust) / intensity
Result is much better than raw "measured" data.
About distortion compensation, it seems that I found a way how to realize it without pixel to pixel calculations: exchange it by column to column calculations after realization cart2pol transformation: each image radius will corresponds to its column. So for such transformation I only needs to shift and interpolate columns' data. Recently I saw in Answers image of cart2pol transformation, but lost reference. It could save me some coding time, but this is not crytical
I'm writing a letter to ML authorities. Thanks again for your help.

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

### 카테고리

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