logo       

Re: CvSobel: msg#00255

lib.opencv

Subject: Re: CvSobel

Hello Luiz,
Still I get wrong results
For example I have an Image:
0 0 0 0 0 0 0 0 0 0
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49
50 51 52 53 54 55 56 57 58 59
60 61 62 63 64 65 66 67 68 69
70 71 72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87 88 89

If I run following code...

IplImage* derivx = cvCreateImage(cvSize(width,height),IPL_DEPTH_16S,1);
IplImage* scaledderivx = cvCreateImage(cvSize(width,height),IPL_DEPTH_8U,1);
cvSobel(image2,derivx,1,0);
cvConvert(derivx,scaledderivx);

...., I get following Sobel matrix:
1 2 2 2 2 2 2 2 2 1
0 0 3 6 6 6 6 6 6 6
6 3 0 0 4 8 8 8 8 8
8 8 8 4 0 0 4 8 8 8
8 8 8 8 8 4 0 0 4 8
8 8 8 8 8 8 8 4 0 0
4 8 8 8 8 8 8 8 8 4
0 0 4 8 8 8 8 8 8 8
8 4 0 0 4 8 8 -91 0 0
0 -9 19 0 0 0 0 0 0 -1


But this are wrong values! If I manually compute the first derivate with
filter [-1 0 1], the value of Pixel (2,2) for example is "13*1 + 12*0 -11" =
2 and not 0 as computed by cvSobel.

What is wrong here?


Thank you very much

Stefan


















Am Dienstag, 7. März 2006 15:22 schrieb Luiz Curado:
> Hello, Stefan!
>
> Try something like this:
>
> IplImage* src;
> IplImage* outra;
> IplImage* sobelImg;
>
> // load src
> outra = cvCreateImage( cvGetSize(src), IPL_DEPTH_16S, 1 );
> cvSobel( src, outra, 1, 1 );
> sobelImg = cvCreateImage( cvGetSize(src), IPL_DEPTH_8U, 1 );
> cvConvertScale( outra, sobelImg );
> cvNamedWindow( "3.Sobel", 1 );
> cvShowImage( "3.Sobel", sobelImg );
>
> With best regards,
>
> Luiz Reginaldo
>
>
> Stefan Meyer <stefan.meyer@xxxxxxxxxxxxxxxxxxxxxxxxxx> escreveu:
> Hello,
> could anyone explain me the usage of CVSobel? I Dont know, how I can
> compute the first derivatives respectively how I can use the result of
> CVSobel. If I compute the derivative manually, I get other values.
>
> Thanks
> Stefan
>
>
> Change settings: http://www.yahoogroups.com/mygroups, select
> Get Emails (get all posts)
> Daily Digest (one summary email per day)
> Read on the web (read posts on the web only)Or Unsubscribe by mailing
> OpenCV-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
>
> SPONSORED LINKS
> Open source software Computer vision
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "OpenCV" on the web.
>
> To unsubscribe from this group, send an email to:
> OpenCV-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Yahoo! Acesso Grátis
> Internet rápida e grátis. Instale o discador agora!
>
> [Non-text portions of this message have been removed]
>
>
>
> Change settings: http://www.yahoogroups.com/mygroups, select
> Get Emails (get all posts)
> Daily Digest (one summary email per day)
> Read on the web (read posts on the web only)Or Unsubscribe by mailing
> OpenCV-unsubscribe@xxxxxxxxxxxxxxx
>
> Yahoo! Groups Links
>
>
>

--
Stefan Meyer
Phone: +49 9131 85-25158
Fax: +49 9131 85-25149

University of Erlangen-Nuremberg
Department of Computer Science 12
(Hardware-Software-Co-Design)
Am Weichselgarten 3
D-91058 Erlangen
Germany


Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise