{"id":5757,"date":"2018-06-18T00:43:37","date_gmt":"2018-06-18T00:43:37","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=5757"},"modified":"2018-06-18T00:43:37","modified_gmt":"2018-06-18T00:43:37","slug":"convert-cv2-image-mxnet-image","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/convert-cv2-image-mxnet-image\/","title":{"rendered":"Convert cv2 image to mxnet image"},"content":{"rendered":"<p>When trying to operated on an image from opencv (cv2), in mxne, I got errors in _cvimresize that say &#8220;Argument src must have NDArray type, but got &#8230;&#8221;.<\/p>\n<p>The key is it convert the object using  mx.nd.array, like so:<\/p>\n<pre lang=\"python\">\nnewImage = mx.nd.array(src)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fixing an interoperability issue between opencv and mxnet<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[374,407,447],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5757"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=5757"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/5757\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=5757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=5757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=5757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}