{"id":1810,"date":"2011-09-24T19:10:00","date_gmt":"2011-09-25T02:10:00","guid":{"rendered":"http:\/\/mcclanahoochie.com\/blog\/?p=1810"},"modified":"2022-01-22T22:40:30","modified_gmt":"2022-01-23T05:40:30","slug":"opencv-vs-libjacket-gpu-sobel-filtering","status":"publish","type":"post","link":"https:\/\/mcclanahoochie.com\/blog\/2011\/09\/opencv-vs-libjacket-gpu-sobel-filtering\/","title":{"rendered":"OpenCV vs. LibJacket: GPU Sobel Filtering"},"content":{"rendered":"<h3><em>Update: LibJacket has been renamed to\u00a0\u00a0<a href=\"http:\/\/www.arrayfire.com\/\" target=\"_blank\" rel=\"noopener\">ArrayFire<\/a>.<\/em><\/h3>\n<p>In response to a comment on a <a title=\"Image processing with LibJacket + OpenCV\" href=\"http:\/\/mcclanahoochie.com\/blog\/2011\/08\/image-processing-with-libjacket-opencv\/\" target=\"_blank\" rel=\"noopener\">previous post<\/a> about<em> integrating LibJacket into an OpenCV project<\/em>, below is just a simple FYI performance comparison of <strong>OpenCV<\/strong>&#8216;s GPU <a href=\"http:\/\/opencv.itseez.com\/modules\/imgproc\/doc\/filtering.html?highlight=sobel#sobel\" target=\"_blank\" rel=\"noopener\">Sobel<\/a> filter versus <strong>LibJacket<\/strong>&#8216;s conv2\u00a0convolution\u00a0filter (with a sobel kernel)&#8230;<\/p>\n<p><em>This is an evolutionary post, so be sure to scroll all the way down to see more comparisons&#8230;<\/em><\/p>\n<p>Update (10\/24\/2011): <a href=\"http:\/\/mcclanahoochie.com\/blog\/2011\/10\/gpu-convolution-opencv-gpu-and-libjacket-part-2\/\" target=\"_blank\" rel=\"noopener\">Round 2<\/a><\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_1811\" aria-describedby=\"caption-attachment-1811\" style=\"width: 497px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1811\" data-permalink=\"https:\/\/mcclanahoochie.com\/blog\/2011\/09\/opencv-vs-libjacket-gpu-sobel-filtering\/cv-versus-jkt\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?fit=804%2C500&amp;ssl=1\" data-orig-size=\"804,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"cv-versus-jkt\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?fit=804%2C500&amp;ssl=1\" class=\"size-full wp-image-1811\" title=\"OpenCV GPU vs. LibJacket\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?resize=507%2C315\" alt=\"Sobel filter: OpenCV GPU vs. LibJacket\" width=\"507\" height=\"315\" srcset=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?w=804&amp;ssl=1 804w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?resize=300%2C186&amp;ssl=1 300w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt.png?resize=482%2C300&amp;ssl=1 482w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/><\/a><figcaption id=\"caption-attachment-1811\" class=\"wp-caption-text\">OpenCV GPU Sobel vs. LibJacket conv2 (2D kernel)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><strong>Test system:<\/strong><br \/>\n<em>[via \/proc\/cpuinfo]:<\/em><br \/>\n<code> Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz<\/code><br \/>\n<em>[via LibJacket&#8217;s ginfo()]:<\/em><br \/>\n<code> Libjacket v1.0.1 (build dd66add) by AccelerEyes<br \/>\nCUDA Driver: 270.41.19<br \/>\nCUDA Toolkit: v4.0<br \/>\nCUDA capable devices detected:<br \/>\nGPU0 GeForce GTX 295, 896 MB, Compute 1.3 (single,double) (in use)<br \/>\nGPU1 GeForce GTX 295, 896 MB, Compute 1.3 (single,double)<\/code><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Test procedure:<\/strong><br \/>\nRandom matrices were generated and used for testing. For every size, the same matrix(image) was used for each call. A &#8220;warm up&#8221; function call was made, then the average over 100 runs is reported. As of writing this, the latest versions of both libraries were used for comparison.<\/p>\n<p><em>One note: I&#8217;m disabling LibJacket&#8217;s &#8216;dynamic caching&#8217; by calling gsync()\u00a0each loop, and without this call (i.e. in normal code) the functions run even faster than above.\u00a0<\/em><\/p>\n<p>Get the <strong><a href=\"https:\/\/code.google.com\/p\/mcclanahoochie\/source\/browse\/cuda\/versus\/versus.cpp\" target=\"_blank\" rel=\"noopener\">source code<\/a><\/strong> and see for yourself!<br \/>\n<em>(put the folder in your \/libjacket\/examples\/ directory)<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><em>The test is by no means an extensive benchmark<\/em>, but it does expose some hints about performance in general for the various platforms. I may bench other functions when I get more time, but right now it looks like <a href=\"http:\/\/web.archive.org\/web\/20110707080428\/http:\/\/wiki.accelereyes.com\/wiki\/libjacket\/\" target=\"_blank\" rel=\"noopener\">LibJacket<\/a> has got a few tricks up it&#8217;s sleeve!<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Update 1:<\/strong><\/p>\n<p>To address the question in the comments about &#8220;convolve()&#8221;, I ran another quick test. This one compares OpenCV&#8217;s GPU &#8220;convolve()&#8221; method against LibJacket&#8217;s &#8220;conv2()&#8221; with varying size Sobel filter kernel sizes. Note: OpenCV&#8217;s <em>filter2D()<\/em>\u00a0doesn&#8217;t support floating point images as of current, so it is not considered here.<\/p>\n<figure id=\"attachment_1830\" aria-describedby=\"caption-attachment-1830\" style=\"width: 785px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1830\" data-permalink=\"https:\/\/mcclanahoochie.com\/blog\/2011\/09\/opencv-vs-libjacket-gpu-sobel-filtering\/cv-versus-jkt-conv\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?fit=795%2C745&amp;ssl=1\" data-orig-size=\"795,745\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"cv-versus-jkt-conv\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?fit=795%2C745&amp;ssl=1\" class=\"size-full wp-image-1830\" title=\"OpenCV GPU vs. LibJacket\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?resize=795%2C745\" alt=\"Conv2: OpenCV GPU vs. LibJacket\" width=\"795\" height=\"745\" srcset=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?w=795&amp;ssl=1 795w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?resize=300%2C281&amp;ssl=1 300w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-versus-jkt-conv.png?resize=320%2C300&amp;ssl=1 320w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/a><figcaption id=\"caption-attachment-1830\" class=\"wp-caption-text\">OpenCV GPU convolve vs. LibJacket conv2<\/figcaption><\/figure>\n<p>It&#8217;s interesting to see that OpenCV seems unaffected by kernel size, while LibJacket&#8217;s performance is quite dependent, and highly favoring smaller kernels.<br \/>\n(LibJacket is not using separable kernels here either).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Update 2:<\/strong><br \/>\nThis seems to be an evolving post, thanks to all the comments!<\/p>\n<p>Up until now, the benchmarks of LibJacket have been using 2D kernels. Since OpenCV&#8217;s Sobel filter <em>uses separable kernels<\/em>, I re-ran the above benchmark using the separable kernel version of LibJacket&#8217;s conv2() function. The dotted line is the same LibJacket 3&#215;3 kernel as in the first chart, for reference on the improvement of separable kernels.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_1837\" aria-describedby=\"caption-attachment-1837\" style=\"width: 770px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1837\" data-permalink=\"https:\/\/mcclanahoochie.com\/blog\/2011\/09\/opencv-vs-libjacket-gpu-sobel-filtering\/cv-vs-jkt-conv2-sep\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?fit=780%2C658&amp;ssl=1\" data-orig-size=\"780,658\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"cv-vs-jkt-conv2-sep\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?fit=780%2C658&amp;ssl=1\" class=\"size-full wp-image-1837\" title=\"OpenCV GPU vs. LibJacket\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?resize=780%2C658\" alt=\"Sobel filter: OpenCV GPU vs. LibJacket\" width=\"780\" height=\"658\" srcset=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?w=780&amp;ssl=1 780w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?resize=300%2C253&amp;ssl=1 300w, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/09\/cv-vs-jkt-conv2-sep.png?resize=355%2C300&amp;ssl=1 355w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/a><figcaption id=\"caption-attachment-1837\" class=\"wp-caption-text\">OpenCV GPU Sobel vs. LibJacket conv2 (separable)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>I wish that I had more time to do a full feature comparison for all overlapping LibJacket\/OpenCV <a href=\"http:\/\/web.archive.org\/web\/20110707080428\/http:\/\/wiki.accelereyes.com\/wiki\/libjacket\/\" target=\"_blank\" rel=\"noopener\">functions<\/a>, but alas, maybe another day&#8230; The source above is enough for anyone else out there to get started though!<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Update 3:<\/strong><br \/>\nAs requested in the comments, here are the Fermi Tesla benchmarks.<\/p>\n<p>Note: If the goal here was solely Sobel filtering, then one would compare jkt::conv2 vs cv::gpu::Sobel (first figure below).\u00a0To generalize to any convolution though (second\/third figures below), in Opencv-GPU, one must either use cv::gpu::filter2D or cv::gpu::convolve. Unfortunately,\u00a0<em>filter2D<\/em> only works on uchar images, while <em>convolve<\/em> works on any type; the common data-type between LibJacket and OpenCV <em>float<\/em>.\u00a0According to the comments, convolve was designed for larger kernels, while their sobel stops at 16&#215;16 (I experimentally discovered this).\u00a0I would say for general floating point convolutions, jkt::conv2 vs cv::convolve is a fair comparison.<\/p>\n<figure id=\"attachment_1846\" aria-describedby=\"caption-attachment-1846\" style=\"width: 556px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-1b.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"size-full wp-image-1846\" title=\"Screenshot-f2-1\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-1b.png?resize=566%2C511\" alt=\"\" width=\"566\" height=\"511\" \/><\/a><figcaption id=\"caption-attachment-1846\" class=\"wp-caption-text\">OpenCV GPU Sobel vs. LibJacket conv2 (separable)<\/figcaption><\/figure>\n<figure id=\"attachment_1847\" aria-describedby=\"caption-attachment-1847\" style=\"width: 557px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-0b.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"size-full wp-image-1847\" title=\"Screenshot-f2-0\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-0b.png?resize=567%2C516\" alt=\"\" width=\"567\" height=\"516\" \/><\/a><figcaption id=\"caption-attachment-1847\" class=\"wp-caption-text\">OpenCV GPU convolve vs. LibJacket conv2 &#8211; small kernels<\/figcaption><\/figure>\n<figure id=\"attachment_1848\" aria-describedby=\"caption-attachment-1848\" style=\"width: 551px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-2b.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"size-full wp-image-1848\" title=\"Screenshot-f2-2\" src=\"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-2b.png?resize=561%2C513\" alt=\"\" width=\"561\" height=\"513\" \/><\/a><figcaption id=\"caption-attachment-1848\" class=\"wp-caption-text\">OpenCV GPU convolve vs. LibJacket conv2 &#8211; larger kernels<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><em><strong>See also: <a title=\"Local Contrast Enhancement with ArrayFire + OpenCV\" href=\"http:\/\/mcclanahoochie.com\/blog\/portfolio\/local-contrast-enhancement-with-arrayfire-opencv\/\">OpenCV+ArrayFire<\/a><\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: LibJacket has been renamed to\u00a0\u00a0ArrayFire. In response to a comment on a previous post about integrating LibJacket into an OpenCV project, below is just a simple FYI performance comparison of OpenCV&#8216;s GPU Sobel filter versus LibJacket&#8216;s conv2\u00a0convolution\u00a0filter (with a sobel kernel)&#8230; This is an evolutionary post, so be sure to scroll all the way &#8230; <a title=\"OpenCV vs. LibJacket: GPU Sobel Filtering\" class=\"read-more\" href=\"https:\/\/mcclanahoochie.com\/blog\/2011\/09\/opencv-vs-libjacket-gpu-sobel-filtering\/\" aria-label=\"Read more about OpenCV vs. LibJacket: GPU Sobel Filtering\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[91,193,103,100,54,92,194],"class_list":["post-1810","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-arrayfire","tag-benchmarking","tag-gpgpu","tag-gpu","tag-image-processing","tag-opencv","tag-sobel"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pZdXI-tc","jetpack-related-posts":[{"id":1731,"url":"https:\/\/mcclanahoochie.com\/blog\/2011\/08\/image-processing-with-libjacket-opencv\/","url_meta":{"origin":1810,"position":0},"title":"Image processing with LibJacket + OpenCV","author":"mcclanahoochie","date":"August 24, 2011","format":false,"excerpt":"Update: one year later:\u00a0ArrayFire+OpenCV The OpenCV library is the de-facto standard for doing computer vision and image processing research projects. OpenCV includes several hundreds of computer vision algorithms, aimed for use in real-time vision applications. LibJacket is a matrix library built on CUDA. LibJacket offers hundreds of general matrix and\u2026","rel":"","context":"In \"arrayfire\"","block_context":{"text":"arrayfire","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/arrayfire\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/08\/Screen-shot-2011-08-24-at-2.42.52-PM-1024x640.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/08\/Screen-shot-2011-08-24-at-2.42.52-PM-1024x640.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/08\/Screen-shot-2011-08-24-at-2.42.52-PM-1024x640.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1896,"url":"https:\/\/mcclanahoochie.com\/blog\/2011\/11\/gpu-tv-l1-optical-flow-with-libjacket\/","url_meta":{"origin":1810,"position":1},"title":"GPU TV-L1 Optical Flow with ArrayFire","author":"mcclanahoochie","date":"November 6, 2011","format":false,"excerpt":"Update 1: LibJacket has been renamed to\u00a0\u00a0ArrayFire. Update 2: Huang Chao-Hui was nice enough to port the LibJacket code mentioned here to ArrayFire - see his work here. As one of my\u00a0Computer Vision\u00a0class\u00a0projects, I decided to implement optical flow, because I wanted to learn more about optical flow, and also\u2026","rel":"","context":"In \"arrayfire\"","block_context":{"text":"arrayfire","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/arrayfire\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/11\/jkt-oflow-tvl1-1024x626.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/11\/jkt-oflow-tvl1-1024x626.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/11\/jkt-oflow-tvl1-1024x626.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1876,"url":"https:\/\/mcclanahoochie.com\/blog\/2011\/10\/gpu-convolution-opencv-gpu-and-libjacket-part-2\/","url_meta":{"origin":1810,"position":2},"title":"GPU Convolutions: OpenCV GPU and LibJacket &#8211; Part 2","author":"mcclanahoochie","date":"October 24, 2011","format":false,"excerpt":"This is a response to my earlier post comparing OpenCV's gpu::convolve() and LibJacket's jkt::conv2() convolution functions, at various image and kernel sizes. That post generated a lot of traffic, most notably from the OpenCV developer community. Taking note of this, it seems that the folks at Willow Garage have re-vamped\u2026","rel":"","context":"In \"arrayfire\"","block_context":{"text":"arrayfire","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/arrayfire\/"},"img":{"alt_text":".","src":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-2075.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-2075.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/10\/Screenshot-f2-2075.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2503,"url":"https:\/\/mcclanahoochie.com\/blog\/2012\/11\/sc12-arrayfire-webcam-demo\/","url_meta":{"origin":1810,"position":3},"title":"SC12 ArrayFire Demos","author":"mcclanahoochie","date":"November 25, 2012","format":false,"excerpt":"I got the\u00a0privilege\u00a0of developing some of the\u00a0Super Computing 2012\u00a0(SC12)\u00a0booth demos\u00a0for\u00a0AccelerEyes,\u00a0to showcase\u00a0ArrayFire. Above is an\u00a0ArrayFire\u00a0demo running at SC12 on an nVidia GPU. This demo (source code HERE) uses OpenCV to capture webcam video and processes the stream in several different ways, in real-time.\u00a0From top-left to bottom-right: Sobel filter, ArrayFire logo, Motion\u2026","rel":"","context":"In \"arrayfire\"","block_context":{"text":"arrayfire","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/arrayfire\/"},"img":{"alt_text":"Sobel filter, ArrayFire logo, Motion (frame differencing), Source image, Histogram plot, Mean-shift filter","src":"https:\/\/i0.wp.com\/lh5.googleusercontent.com\/-5haNiIGwpIk\/UKw-ct6OHDI\/AAAAAAAAMd8\/lxnzbUk44Kc\/s912\/20121114_111339.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2347,"url":"https:\/\/mcclanahoochie.com\/blog\/2012\/08\/local-contrast-enhancement-with-arrayfire-opencv\/","url_meta":{"origin":1810,"position":4},"title":"Local Contrast Enhancement with ArrayFire + OpenCV","author":"mcclanahoochie","date":"August 20, 2012","format":false,"excerpt":"About one year ago, I wrote about a simple example of Image Processing with LibJacket + OpenCV... and the trend continues today. In this post, I demonstrate how ArrayFire (an improved version of LibJacket) can easily interop with OpenCV, through a simple example of unsharp maksing (local contrast enhancement). \u00a0\u2026","rel":"","context":"In \"arrayfire\"","block_context":{"text":"arrayfire","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/arrayfire\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2012\/08\/Screen-Shot-2012-08-20-at-9.19.21-AM_2-1024x640.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2012\/08\/Screen-Shot-2012-08-20-at-9.19.21-AM_2-1024x640.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2012\/08\/Screen-Shot-2012-08-20-at-9.19.21-AM_2-1024x640.png?resize=525%2C300 1.5x"},"classes":[]},{"id":881,"url":"https:\/\/mcclanahoochie.com\/blog\/2011\/01\/cuda-opencv-sobel\/","url_meta":{"origin":1810,"position":5},"title":"Misc CUDA + OpenCV Fun : Sobel Filter","author":"mcclanahoochie","date":"January 1, 2011","format":false,"excerpt":"March 2010 I recently started playing with the\u00a0Nvidia CUDA SDK Samples involving image processing. I extracted the\u00a0SobelFilter kernel and made\u00a0it run off my USB webcam using\u00a0OpenCV - the two live modes\u00a0are\u00a0single-channel-gray and\u00a0three-channel-rgb. I wrote two different basic kernels on my own that did\u00a0binary thresholding and found the most\u00a0dominant RGB value.\u2026","rel":"","context":"In \"cuda\"","block_context":{"text":"cuda","link":"https:\/\/mcclanahoochie.com\/blog\/tag\/cuda\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mcclanahoochie.com\/blog\/wp-content\/uploads\/2011\/01\/cuda-fun.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/posts\/1810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/comments?post=1810"}],"version-history":[{"count":0,"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/posts\/1810\/revisions"}],"wp:attachment":[{"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/media?parent=1810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/categories?post=1810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mcclanahoochie.com\/blog\/wp-json\/wp\/v2\/tags?post=1810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}