Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34692
| References | <CAFqGZRG8ifY6kUSw0UCVyYE_KkzmDTye4mzEqOgP4H7xOjE77A@mail.gmail.com> |
|---|---|
| Date | 2012-12-13 02:05 +1100 |
| Subject | Re: Error .. Please Help |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.777.1355324742.29569.python-list@python.org> (permalink) |
On Thu, Dec 13, 2012 at 2:00 AM, inshu chauhan <insideshoes@gmail.com> wrote: > In this code : > > import cv > if color == (0.0,255.0,0.0): > classification = 1 > ... > elif color == (255.0, 0.0, 255.0): > classification = 7 > > print >> g, x , y , color, classification > What happens if the color isn't one of the ones you picked? You may need an 'else' clause on your if/elif/elif block, and some classification value meaning "other". ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Error .. Please Help Chris Angelico <rosuav@gmail.com> - 2012-12-13 02:05 +1100
csiph-web