2 of 2
2
[Ps3eye] Custom lens, perfect fit base (m12x0.5), no glue. 
Posted: 08 April 2009 03:35 AM   [ Ignore ]   [ # 16 ]
Avatar
RankRank
Joined  2009-03-11
Total Posts:  246
Member

Okay, I understand.

And isn’t there a way to cut out a bit more of the mount (like in Peau’s tutorial), so the filter sits a bit deeper in the mount?
Or is the maximum already reached?

 Signature 

My multi-touch DSI coffee-table
Touch it! - Just another multi-touch-blog

Profile
 
 
Posted: 08 April 2009 03:39 AM   [ Ignore ]   [ # 17 ]
Rank
Joined  2009-03-09
Total Posts:  28
New Member
cdog - 08 April 2009 03:35 AM

Okay, I understand.

And isn’t there a way to cut out a bit more of the mount (like in Peau’s tutorial), so the filter sits a bit deeper in the mount?
Or is the maximum already reached?

I already cut the maximum I can (I am afraid to damage the lens with my cutter if I continue...)

 Signature 

My Blog

Profile
 
 
Posted: 09 April 2009 03:18 AM   [ Ignore ]   [ # 18 ]
Avatar
Rank
Joined  2009-03-17
Total Posts:  20
New Member

cdog, is nice to see that same camera helps you with the mounts. I’ve used cameras screws for the new mount too.

ZeblodS, i’m am trying to work with this camera and wide angle lense, i wan’t to program touch detection for this, and i’ve searched thoose links for barrel distortion correction (hope they can help you):

http://www.cs.hmc.edu/~fleck/iowa-lab/wide.html
http://www.proxel.se/manuals/lensanalyzer_help.html
http://www.all-in-one.ee/~dersch/barrel/barrel.html
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/lenscorrection/
http://wiki.panotools.org/Lens_correction_model
http://toothwalker.org/optics/distortion.html
http://rtreport.ksc.nasa.gov/techreports/2003report/100/110.html

 Signature 

The links i post are only to help people finding things that i’ve found. I dont have any deal with sellers/websites.

Sorry of my english.

Profile
 
 
Posted: 09 April 2009 04:35 AM   [ Ignore ]   [ # 19 ]
Rank
Joined  2009-03-09
Total Posts:  28
New Member
Aitor - 09 April 2009 03:18 AM

cdog, is nice to see that same camera helps you with the mounts. I’ve used cameras screws for the new mount too.

ZeblodS, i’m am trying to work with this camera and wide angle lense, i wan’t to program touch detection for this, and i’ve searched thoose links for barrel distortion correction (hope they can help you):

http://www.cs.hmc.edu/~fleck/iowa-lab/wide.html
http://www.proxel.se/manuals/lensanalyzer_help.html
http://www.all-in-one.ee/~dersch/barrel/barrel.html
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/lenscorrection/
http://wiki.panotools.org/Lens_correction_model
http://toothwalker.org/optics/distortion.html
http://rtreport.ksc.nasa.gov/techreports/2003report/100/110.html

I am currently doing a barrel correction algorithm and so far it work pretty fine.

I am at this state :

void barrelTest()
{
    
// Init OpenCV
    
IplImagein cvLoadImage("test.png"1);
    
IplImageou cvCreateImage(cvSize(in->widthin->height), IPL_DEPTH_8U1);

    
// Variables globales
    
unsigned char *inp = (unsigned char*)in->imageData;
    
unsigned char *oup = (unsigned char*)ou->imageData;
    
unsigned short x in->width;
    
unsigned short y in->height;
    
unsigned short midX 2.0;
    
unsigned short midY 2.0;

    
// Parametres de la transformation
    
double cor 0.0000051;

    
// Traitement
    
double coefX 1.0 midX midX cor;
    
double coefY 1.0 midY midY cor;
    for(
unsigned short i 0xi++)
        for(
unsigned short j 0yj++)
        
{
            double cushion 
= (1.0 + (midX i) * (midX i) * cor) * (1.0 + (midY j) * (midY j) * cor);
            
short newI midX + ((midX) * cushion) / coefX;
            
short newJ midY + ((midY) * cushion) / coefY;
            if(
newI >= && newI && newJ >= && newJ y)
                
oup[newJ newI] = ( inp[(i) * 3] inp[(i) * 1] inp[(i) * 2] ) / 3.0;
        
}

    
// Affichage du résultat
    
cvNamedWindow("Resultat"CV_WINDOW_AUTOSIZE);
    
cvShowImage("Resultat"ou);
    
cvWaitKey(0);

    
// Destruction generale
    
cvDestroyWindow("Resultat");
    
cvReleaseImage(&in);
    
cvReleaseImage(&ou);
}

It is using the OpenCV lib (not for the barrel correction) and the “test.png” picture is one of theses picture : http://nuigroup.com/forums/viewreply/30729/

The final purpose is to make that code in CUDA language (C language for nVidia’s GPU), so I am using OpenCV only for loading and displaying the picture, the rest of the code is just C language.

For now, it correct the barrel effect using the “cor” var (not intuitive values...). I will try to make the “cor” var going between 0 and 100% (instead of 0.0000XXX values...)

After that I think it will be a much better idea to stride the output picture and seek for the corresponding pixel in the input picture (currently it is the opposite, so I have some black pixel in the output picture...)

[EDIT]

I find a weird result with that code. It looks like your camera was not exactly perpendicular to the screen. Is it true, or this algo is wrong ?

Image Attachments
test.pngcorr.png
 Signature 

My Blog

Profile
 
 
Posted: 10 April 2009 11:41 AM   [ Ignore ]   [ # 20 ]
Avatar
Rank
Joined  2009-03-17
Total Posts:  20
New Member

My camera wasn’t perpendicular, it was only to probe cam.
I think it would be easyer to use lookup tables for transformation, i hope they are really a lot faster than thoose expensive calcs.
CUDA will be ok, but it works only for last generation NVIDIA cards, have you seen about GPGPU?
For last thing, i think the best is to correct only barrel distortion where is needed, not as usual in image processing, all the image, only blobs, or other important things (less transformations to do).

I’m now programing test app to see video on linux, and its working ok, but i can’t have les use of CPU than 10% (really 10-12%) at 640x480@60fps, with v4l2&GTK.

 Signature 

The links i post are only to help people finding things that i’ve found. I dont have any deal with sellers/websites.

Sorry of my english.

Profile
 
 
Posted: 05 June 2009 08:02 AM   [ Ignore ]   [ # 21 ]
RankRank
Joined  2009-04-20
Total Posts:  215
Member

do you need to remove the distortion? or would it be enough to use many calibration points in ccv?

Profile
 
 
   
2 of 2
2