Ask Your Question
0

Photos not being processed

asked 2013-09-12 22:35:59 -0500

marvelous gravatar image

I am trying to upload a photo for processing from my phonegap application

The photo uploads with no problem but the photo is not being processed. I have tried every step of this process and the problem seems to lie in the photo name that is created is not being processed though it is passed from the php script (used to upload the photo) to the python script used to process the photo.

here is some sudo code to better illustrate my question

import sys from SimpleCV import Image, math

imgvar = str(sys.argv[1])

circle = Image(imgvar)

then.......

What am I doing wrong. Php passes the system argument simple cv just doesnt want to use the image name as written?? Any help would be much appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-09-13 14:20:05 -0500

marvelous gravatar image

I even tried a sleep call in php and still not getting the output i desired. Anything else you could think that could be wrong?

edit flag offensive delete link more

Comments

Are you sure you are encoding the file correctly? Is it actually saving a file out to the filesystem?

xamox gravatar imagexamox ( 2013-09-15 17:48:59 -0500 )edit

Yeah I know it is weird. It is saving I tried the callback and I tried letting it sleep still nothing. Its not a connection problem and I had all the modules installed. Its definitely server side though.

marvelous gravatar imagemarvelous ( 2013-09-15 18:03:33 -0500 )edit
0

answered 2013-09-13 09:40:53 -0500

xamox gravatar image

Two things, are you sure that the file is actually being written to the file system with PHP? If so are you sure that the file is completely done before SimpleCV tries to load it. When the filesystem is saving a file it has to create the name and location before it is completely done. Not sure when your PHP code is running it but you may want it to be in a callback function to verify that is has finished writing the file first.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-09-12 22:35:59 -0500

Seen: 279 times

Last updated: Sep 13 '13