Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 2 3 
Send Topic Print
Using picoC (Read 26206 times)
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #30 - 04/06/10 at 1:54am
 
Hy,
How  can i receive a frame from SRV camera throw PicoC and TerraTerm?
I try to manipulate same image and send the result as a image, or int[][]. If someone can explaine how use vsend(int size).
 
Back to top
 
 
WWW good4u_tomi   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Using the new C interpreter
Reply #31 - 04/06/10 at 9:02am
 
Just as it is described in http://www.surveyor.com/C.html:
 
void vcap(): capture video frame
 
int vjpeg(int quality): compress image captured by vcap(). use vsend() to transmit:
     int size = vjpeg(int quality);
     vsend(size);
   returned value is size of jpeg image. input parameter is quality of jpeg image (1-8, 1 = highest quality)
 
void vsend(int size): send JPEG image that was captured and compressed using vcap() and vjpeg()
 
 
int x;
vcap();
x = vjpeg(4);
vsend(x);
 
Note that this will just send the raw jpeg image, so you need a way to capture it.  Also, you have to write the console interface for your picoC program, i.e. the external command that tells your picoC program to capture and send an image.  From your question, it isn't clear that you've worked out that part of the requirement.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #32 - 04/09/10 at 4:45am
 
i make this and work, Thanks  
I want to ask: if a write in C# or C++ a program who i can receive the frame. It's can be receiave in a  TCP client program? because i want to run in PicoC mode from my aplication, anyway i will try that today, but i expecting any suggestion. Smiley Thanx
 
Now i didn't know what i want really, i just try all the opportunity  Tongue sorry my language. Thanx
Back to top
 
 
WWW good4u_tomi   IP Logged
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #33 - 04/09/10 at 4:51am
 
I try to receive the image take with vcap() throw Xmode TeraTerm but dont work, or i dont know how to receive the result by Xmode TeraTerm. If you have any sugestion i will be glad.  A have make a pocket pc aplication to control the SRV robot and i will posted the .cab Smiley
And if is anyone who have a similar aplication i will be glad to try it.
Bye and Thanks
Back to top
 
 
WWW good4u_tomi   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Using the new C interpreter
Reply #34 - 04/09/10 at 8:02am
 
The transfer via vsend() is not XMODEM - it's just a serial stream of data from the JPEG image.  The easiest solution might be to send the same 10-byte header we use with the firmware's 'I' command in front of the vsend() command and then interface via one of the java consoles.
 
When I have a chance, I'll post a code sample that might illustrate this.
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Using the new C interpreter
Reply #35 - 04/10/10 at 4:17pm
 
Here's a little picoC program that will send JPEG's in response to the 'I' requests from SRV1Console, SRV1Test, labivew-srv,  RoboRealm, and any other console based on SRV_protocol ...
 
==================================
 
int size, ch;
 
while (1) {
    if (signal()) {
       ch = input();
       switch (ch) {
           case 'I':
               vcap();
               size = vjpeg(4);
               printf("##IMJ5%c%c%c%c", size & 0x000000FF,  
                      (size & 0x0000FF00) / 0x100, (size & 0x00FF0000) / 0x10000, 0);
               vsend(size);
               break;
           case 0x1b:  // ESC
               exit();
       }
    }
}
Back to top
 
« Last Edit: 04/10/10 at 4:26pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #36 - 04/12/10 at 6:37am
 
OK,  so I must add this to  picoC and than compile the firmware, anyway i must add function to the firmare   to adapt it at my project.  
Thanks for aswers!
Back to top
 
 
WWW good4u_tomi   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Using the new C interpreter
Reply #37 - 04/12/10 at 7:09am
 
There is nothing to compile.  You upload the code to the Blacfkin flash buffer and run it via the 'Q' command or through one of the consoles that supports picoC uploads such as labview-srv or DelphiSRV.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #38 - 04/21/10 at 6:30am
 
Can you give me some details about vdiff() function from picoC. About where she store the current bitmap and who i can find the different pixels.
And if you know a tutorial about who to add some few function to SRV C interpretor Smiley
Thank you a lot.
Back to top
 
 
WWW good4u_tomi   IP Logged
vaolaritei
Junior Member
**




Posts: 62
Re: Using the new C interpreter
Reply #39 - 04/21/10 at 6:34am
 
I did a  formal language translation course, and i have an idea about this but i try to find some help.
Back to top
 
 
WWW good4u_tomi   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Using the new C interpreter
Reply #40 - 04/21/10 at 7:12am
 
We currently don't provide a way to extract frame differencing info in picoC - the vdiff() function only changes a display flag -  but we should fix this.  
 
What specific information would you like to capture - perhaps a pixel count (based on a threshold) and a centroid calculation ?   We could still use vrcap() to capture a reference frame and then use vcap() + a new version of vdiff(threshold) to compute this information.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1 2 3 
Send Topic Print