I can&#39;t claim to know much at all, but Andrew has been slowly adding color support for his code, so perhaps that&#39;s why you&#39;re getting this now? <br><br>- Floris<br><br><br><br><div class="gmail_quote">On Fri, Jul 17, 2009 at 8:19 AM, Kristin Branson <span dir="ltr">&lt;<a href="mailto:kristin@vision.caltech.edu">kristin@vision.caltech.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m getting an error using imops.mono_to_rgb8 that I hadn&#39;t been getting before. <br>
<br>Here is code that reproduces the error:<br><br><span style="font-family: courier new,monospace;">import numpy</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import motmot.imops.imops as imops</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">image = numpy.zeros((100,200),dtype=&#39;uint8&#39;)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">out = imops.mono8_to_rgb8(image)</span><br style="font-family: courier new,monospace;"><br>Gives the error message:<br><br><span style="font-family: courier new,monospace;">Traceback (most recent call last):</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  File &quot;imops.pyx&quot;, line 95, in imops.mono8_to_rgb8 (src/imops.c:1138)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">TypeError: must be uint8 arrays</span><br style="font-family: courier new,monospace;"><br>The original error appeared in Ctrax:<br><br><span style="font-family: courier new,monospace;">Traceback (most recent call last):</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  File &quot;/home/kristin/FLIES/code/Ctrax/Ctrax/settings.py&quot;, line 372, in OnSettingsBG</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    self.bg_imgs.DoSub()</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  File &quot;/home/kristin/FLIES/code/Ctrax/Ctrax/bg.py&quot;, line 1284, in DoSub</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    self.img_wind.update_image_and_drawings(&#39;bg&#39;,img_8,format=&#39;MONO8&#39;)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  File &quot;/var/lib/python-support/python2.5/motmot/wxvideo/wxvideo.py&quot;, line 69, in update_image_and_drawings</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    rgb8 = imops.to_rgb8(format,image)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  File &quot;imops.pyx&quot;, line 356, in imops.to_rgb8 (src/imops.c:4147)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  File &quot;imops.pyx&quot;, line 95, in imops.mono8_to_rgb8 (src/imops.c:1138)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">TypeError: must be uint8 arrays</span><br style="font-family: courier new,monospace;">

<br>This did not used to give an error. Am I using to_rgb8 incorrectly?<br><br>Thanks!<br><font color="#888888">Kristin<br>
</font><br>_______________________________________________<br>
Motmot mailing list<br>
<a href="mailto:Motmot@code.astraw.com">Motmot@code.astraw.com</a><br>
<a href="http://code.astraw.com/cgi-bin/mailman/listinfo/motmot" target="_blank">http://code.astraw.com/cgi-bin/mailman/listinfo/motmot</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Floris van Breugel<br>Caltech Graduate Student<br>Control and Dynamical Systems<br>(925) 963 8280<br><br>Wildlife and Landscape Photographer<br>Galleries: <a href="http://www.ArtInNaturePhotography.com/">http://www.ArtInNaturePhotography.com/</a><br>
Blog: <a href="http://ArtInNature.wordpress.com/">http://ArtInNature.wordpress.com/</a><br>2010 CALENDARS! Now available on my website!<br><br>