template matching - ValueError: image must be 2d / 3d array

169 views
Skip to first unread message

Anurag

unread,
Jan 23, 2016, 8:06:58 PM1/23/16
to scikit...@googlegroups.com
Hello,
I am trying to run Template Matching code as mentioned in http://scikit-image.org/docs/dev/auto_examples/plot_template.html, however, on trying to read an image from file, it returns the following error:
ValueError: The parameter `image` must be a 2-or-3-dimensional array

full gist and Traceback at:
https://gist.github.com/anuragphadke/48b8565a6bcaa477daa5

Any tips on what I might be doing wrong here? tried converting image to grayscale etc.


--
Twitter: @anuragphadke (https://twitter.com/#!/anuragphadke)

Stéfan van der Walt

unread,
Jan 23, 2016, 8:16:04 PM1/23/16
to scikit-image
Hi Anurag

On Sat, Jan 23, 2016 at 5:06 PM, Anurag <anurag...@gmail.com> wrote:
> full gist and Traceback at:
> https://gist.github.com/anuragphadke/48b8565a6bcaa477daa5

Please provide your input images as well.

Thanks
Stéfan

Anurag

unread,
Jan 23, 2016, 8:22:55 PM1/23/16
to scikit...@googlegroups.com
turns out, it was bug in my code, the following snippet works:

https://gist.github.com/anuragphadke/56a3be21128852f69031

-anurag


On Sat, Jan 23, 2016 at 5:06 PM, Anurag <anurag...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages