02-18-2015 05:27 AM
Hello,
I am trying to upload for a specific url an image and i want to get back the data processed , how can this be done ?
i have tried the data socket model its not working.
Thanks ,
02-18-2015 07:09 AM
You need to provide more information about what you're trying to do.
How are you intending to upload/download the data - via HTTP (e.g. GET/POST), FTP or?
What are you communicating to - a script on a web server or something else?
02-18-2015 10:31 AM
This will download a file.
02-18-2015 02:00 PM
this is what i want to communicate with
http://deeplearning.cs.toronto.edu/
i want to upload an image and get the classification. i hope this works.
please advise,
Thank you,
02-18-2015 03:32 PM
Do you know how you are able to upload and retrieve images without using the UI? Is there a POST or GET backdoor that allows you to submit the data for processing? Are you working with the CS department they might be able to tell you more about this then we can.
Once you are aware of the protocol of how you are actually able to go about uploading and retrieving images then we will be able to help you, but until then we are not really able to help as I doubt anyone here has contacts withing the toronto CS department.
02-19-2015 07:38 AM - edited 02-19-2015 07:41 AM
You will need either:
1) Request or ask for an API that allows you submit images via POST and returns the result via HTTP
2) Try to 'hack' the webpage to mimic a user submitting the form by doing what the form does to upload the image:
Send a multipart POST request to api/upload.php with a file input named 'userfile' and 'upload-classify' and see what gets returned. You may be able to parse the result to get the information you need.
Here's an example of how to POST multipart form data (e.g. an image):
As ogk.nz has said, this is a backdoor and may not be permitted by the sites terms and conditions (and often a lot of websites have protection against machines accessing their resources etc.).
02-20-2015 06:21 AM
Can you please upload a sample program ?
Thanks,
02-21-2015 03:16 PM
i have implemented your sample but there is some errors
can you please help me and fix them ?
Thanks ,
02-21-2015 04:49 PM
Sam's message contains a VI snippet. You can copy the image file to your harddrive then drag it onto your block diagram.
The problem is you didn't code it the way he showed it. First he used Bundle by Name. Also, Sam used a typedef constant into both of those Bundle by Names (you missed the 2nd one.) Also, his is a typedef that is what function is looking for. Yours is just some randomly created cluster that doesn't have the same definition of elements that his has.
02-21-2015 06:57 PM
thanks for the info. i did what u said and ran the program but there is an error
"error while reading from the socket"
any advice ?