I have some questions regarding Barrel distortion and pincushion distortion. Since they are related I have put them in single post.
I am aware that barrel distortion occurs more in wide-angle lenses, wherein straight lines near edges of the frame curve outwards. Is it pincushion distortion when lines curve inward, and in what conditions (what types of lenses, etc.) does pincushion distortion occur?
I am aware that some new cameras (DSLRs, DSCs, SLDs) have in-camera corrections for these distortions, and also there are some tools to correct it in post processing (e.g., PTlens) but what is the exact procedure used in the correction process? Does the correction process work in Raw Bayer domain, or after some color conversion to YCbCr?
Any pointers (especially for question 2) would be useful, as I am trying to implement one post process for this type of correction.