Discussion Board

Results 1 to 3 of 3

Thread: Syntax error !

  1. #1
    Registered User
    Join Date
    Jul 2009

    Syntax error !

    Since the color conversion RGB to EGray 256 didn't work in imageoperation.py file of PYNCV Lib , I'm writing the code for it as below(part of the main code is shown here which implements the color conversion and find the edge detection of the gray scale image).A syntax error occurs when i execute the script on N95.It is showing error in the line where it is calculating (2*r + 5*g + b)/8. Error:Invalid syntax..Please tell me the problem and also rectify the following lines if you find any error in that.

    if self.mode == Transliteration:

    width, height = self.sNokiaCVImage1.size
    for y in range(1,height):
    for x in range(1,width):
    [(r , g , b)] =self.sNokiaCVImage1.getpixel((x,y))
    tNokiaCVImage = (2*r + 5*g + b)/8
    self.tNokiaCVImage1(x,y) = tNokiaCVImage

    self.sNokiaCVImage2 =self.tNokiaCVImage1
    self.PyCImageOperations.EdgeDetect(self.sNokiaCVImage2, self.tNokiaCVImage2, 4)# canny edge is done
    self.display_image = self.target_image2

  2. #2
    Registered User
    Join Date
    Jul 2009

    Re: Syntax error !

    Indendation is taken care of.It is not showing intendation error.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Ahmedabad, Gujarat, India

    Re: Syntax error !

    hello rangarvind

    what the function NokiaCVImage1.getpixel((x,y)) returns thus it returns three values??

Similar Threads

  1. error including vector
    By Lichtens in forum Open C/C++
    Replies: 5
    Last Post: 2009-04-03, 14:19
  2. Help needed
    By kuhnikuehnast in forum Symbian Tools & SDKs
    Replies: 20
    Last Post: 2009-03-31, 22:55
  3. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  4. CEikDialog Question
    By AdamBeck in forum Symbian
    Replies: 2
    Last Post: 2004-09-30, 19:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts