 <p>Take a look at the OpenCV doc:</p> <p>For <a href="http://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga04723e007ed888ddf11d9ba04e2232de" rel="nofollow">Canny</a>:</p> <blockquote> <p><strong>apertureSize:</strong> aperture size for the Sobel operator.</p> </blockquote> <p>And for <a href="http://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gacea54f142e81b6758cb6f375ce782c8d" rel="nofollow">Sobel</a>:</p> <blockquote> <p><strong>ksize:</strong> size of the extended Sobel kernel; it must be 1, 3, 5, or 7.</p> </blockquote> <p>So the aperture size in <code>Canny</code> is limited by the <code>Sobel</code> kernel size.</p> <p>This is verified in the <a href="https://github.com/Itseez/opencv/blob/master/modules/imgproc/src/canny.cpp#L609-L610" rel="nofollow">source code</a> :</p> <pre><code> if ((aperture_size &amp; 1) == 0 || (aperture_size != -1 &amp;&amp; (aperture_size &lt; 3 || aperture_size &gt; 7))) CV_Error(CV_StsBadFlag, "Aperture size should be odd"); </code></pre> <p>So, unless you rewrite yourself some code, there's no way to use Canny with a larger aperture size. You can apply your custom <em>large sobel filter</em> with <a href="http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/filter_2d/filter_2d.html" rel="nofollow">filter2d</a>, and then code the Canny non maxima suppression.</p> <p>However, Sobel with mask larger then 3x3 is rarely used in practice.</p>