Check out the related Code Repository Files or visit the LabVIEW Wiki Internet Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Sep 6 2008, 09:47 PM
Post
#1
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 6-September 08 Member No.: 12472 Using LabVIEW Since:2008 LV:8.5 ,7.1 ,.
|
Hi guys, I am fairly new user of labview and a new member to this forum and I apologies in advance for any irregularities.
Ok, here is what I have done. I have successfully installed the IMAQUSB drivers and they are working great with my Logitech webcam. Now I have created two separate vis as a client and server to send the video input from the cam over LAN using UDP. I first tested the two programs on a same PC sending the data to localhost and its working great, the image is displayed and the indicator of bytes received is going up And now the problem: The problem happened when I placed the two programs on separate pcs connected over LAN. On both pcs there is an identical set of software from LabView with the drivers running on XP Pro SP2. The two vis are working ok, the firs pc is sending the image and the second should display the image, but it doesn't After this I tried to broadcast the image over lan and again the same thing, on the localhost there is an image and on the remote pc there is no image, but the number of bytes received is going up. If anyone has any idea about this problem or has an example vi for transmitting webcam video over lan ill appreciate it Thanks
|
||
|
|
|||
| Ad |
Sep 6 2008, 09:47 PM
Post
#
|
||
|
|
|
||
|
|
|||
Sep 6 2008, 10:23 PM
Post
#2
|
|||
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3749 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
I am... a new member to this forum Welcome! After this I tried to broadcast the image over lan and again the same thing, on the localhost there is an image and on the remote pc there is no image, but the number of bytes received is going up. Can you post your code? That would help us a lot in tracking down the issue. -------------------- ![]()
|
||
|
|
|||
Sep 7 2008, 03:40 AM
Post
#3
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 6-September 08 Member No.: 12472 Using LabVIEW Since:2008 LV:8.5 ,7.1 ,.
|
Thanks for the welcoming
Here is the part of the code I am having trouble with
image_receiver.vi ( 51.29K )
Number of downloads: 65
image_sender.vi ( 26.07K )
Number of downloads: 51
|
||
|
|
|||
Sep 7 2008, 04:58 AM
Post
#4
|
|||
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3749 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
OK - here's the issue: Most folks will tell you that LabVIEW is dataflow - the data figuratively flows along the wires, so when you branch a wire, the value gets branched, etc - this model is often affectionately referred to as "by-value' (or "by-val" for short). IMAQ is one of the very few LabVIEW paradigms that isn't by-value: it's by-reference ("by-ref"). The purple IMAQ datatype is actually a reference to the image that's somewhere in memory, so when you pass that value between VIs, the image data isn't actually passed, but a reference to where the data is. That's why it works with localhost, but not across different PCs: when you're local host, the reference that the sender sends refers to the same memory space as the receiver receives whereas when you're on different PCs the receiver doesn't have the image data in memory, so the reference is to nothing. The reason you're seeing packets passed is that you're sending the reference across UDP - and that takes space.
So, now that we've gotten that out of the way, you probably want ideas on how to make this work If you get stuck, post again - I'm a little flat-out at the moment, otherwise I'd try to dig up a solution for you... -------------------- ![]()
|
||
|
|
|||
Sep 7 2008, 04:49 PM
Post
#5
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 6-September 08 Member No.: 12472 Using LabVIEW Since:2008 LV:8.5 ,7.1 ,.
|
Thanks for the advice crelf.
I've seen the jpg conversion vi on the forum wile searching for a solution for the problem, I was thinking of using it but I wasn't sure about the problem. I am glad I have your advice now as an experienced user. Ill play around with this more. If you have any other good pointer about this I'll appreciate it
|
||
|
|
|||
Sep 7 2008, 05:06 PM
Post
#6
|
|||
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3749 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
Thanks for the advice crelf. No worries - anytime. If you get a chance, can you please add a link to the jpg string VI? I'd like to tage it so I can find it more easily... -------------------- ![]()
|
||
|
|
|||
Sep 8 2008, 12:23 AM
Post
#7
|
|
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 6-September 08 Member No.: 12472 Using LabVIEW Since:2008 LV:8.5 ,7.1 ,.
|
Here is a link for the JPEG decode and encode pack I think this is what you were talking about.
http://forums.ni.com/ni/board/message?boar...ssage.id=335445 Maybe ill post these in the Machine Vision section so others can access it easily, what do you think about that? |
|
|
|
![]() ![]() |
| Time is now: 1st December 2008 - 10:02 PM |