Sobel automatically default to Scharr when kernel size == 3? [closed]
From the OpenCV docs:
Sobel is only an approximation of the derivative). OpenCV addresses this inaccuracy for kernels of size 3 by using the Scharr() function.
Does this mean that calling "Sobel()" with a kernel size of 3 will actually call the Scharr() function internally?
NOTE: One of the reasons this question was posed is that there are comments that indicate that Sobel does indeed roll over to Scharr in this case. I did not find the docs (quoted above)to be clear on the subject, which may be the reason for the contradictory info. The followup reply by Berak (now deleted for some reason?) does cite Scharr options within Sobel functions, but I did not see any specifics regarding 'rollover' to Scharr, as implied by the quoted docs above.
So I'm not sure why this query shows as 'deleted' at the moment.
lol, i don't remember anything.
look at the src
and no, there is no "automatic rollover" (whatever you meant by that)
you have to explicitly specify CV_SCHARR for ksize, to use a Scharr kernel (of size 3).
https://docs.opencv.org/master/d4/d86...
also: please do not post duplicate questions here
Hi Berak, Oh yeah, you had replied. I stopped in to comment and thank you for the link, but your reply was gone, and the original was marked 'deleted.' (???) I thought I was on StackOverflow there for a second. :-) Seriously, the reply was helpful, especially in that there is contradictory information out there about this. Understandable, given that the line that I quoted above could easily be misinterpreted.
In my app, I'm computing phase angles via vertical and horizontal Sobel, and thought that perhaps Scharr would be worth checking. Tough to gauge the overall effect on final output, so I didn't want to go through the changes and tedious rounds of testing if it was effectively in place already.
Duplicate questions?
PS, now that I think about it, perhaps it was Sturkman that posted the original reply? No evidence of the post now, so it's difficult to tell. Unfortunate, as there was a link to example code that I wanted to follow.
In regard to 'rollover': I was referring to automatic referral from Sobel to Scharr. Yes, I get from the replies that it is not the case, so no further need to clarify.
yea i think so, too.
Berak, I did not see any duplicate questions. I always check. Perhaps you can clarify why this thread now says 'closed as duplicate'? I understand the answer, so It's OK with me if someone wants to delete the thread for some reason, but it would be good to understand why it's a duplicate.
but you do see it now, don't you ?
let's just settle it.
Berak, If you're implying that I reposted the question, be assured that I did not.
I can see what you're referring to now though. I just clicked on my icon to see what you were talking about, and it shows -TWO- duplicates, not just one (total of three posts!?). The other two are listed out of order on a different page. That was not my doing. Something in your software must be splitting the thread into separate copies.