|
-
Feb 24th, 2006, 01:34 PM
#1
Thread Starter
New Member
Image Compression for Data Transfer
I'm not sure if this is the right section to post this in, but I guess it's as good as any.
I want to compress a webcam image to transfer it over the p2p network I'm designing, although I'm not sure of the best mothod to accomplish this. It would have to be a reversable compression, so the image can be exploded into a readable format after transfer. Any ideas?
-
Feb 24th, 2006, 01:44 PM
#2
Re: Image Compression for Data Transfer
how about put it in a zip file and send that, then unzip it at other end
-
Feb 24th, 2006, 01:46 PM
#3
Re: Image Compression for Data Transfer
What type of image file is it? if its jpg or gif they should be fairly small anyway
-
Feb 24th, 2006, 02:21 PM
#4
Thread Starter
New Member
Re: Image Compression for Data Transfer
I was thinking Jpeg, But it's for a webcam. If I don't buffer the images somehow It'll be choppy doing zip decompression (although methinks I might try zip anyway)
-
Feb 24th, 2006, 06:16 PM
#5
Re: Image Compression for Data Transfer
-
Feb 24th, 2006, 06:33 PM
#6
Thread Starter
New Member
Re: Image Compression for Data Transfer
In theory, because of the time it takes to decompress the image and display it prior to a new frame arriving. (unless they are buffered)
-
Feb 24th, 2006, 06:40 PM
#7
Re: Image Compression for Data Transfer
Ah I see, so your getting the image from the webcam and sending it to remote side? For this I would try a socket using the UDP (user datagram protocol) where theres no connection required, it will be a lot quicker than TCP so it will look smoother
-
Feb 24th, 2006, 06:43 PM
#8
Thread Starter
New Member
Re: Image Compression for Data Transfer
but the thing is, each of the clients in the program are issued a session id (and I do this so the program doesn't end up like Y!Messenger back in early 02') upon logging in, so i think it has to be connection dependant protocol. I dunno, but I do appreciate your thoughts on this matter.
-
Feb 24th, 2006, 07:56 PM
#9
Re: Image Compression for Data Transfer
Compression is part of almost all image protocols - you should not want to compress the file but instead select a compression scheme with the image datatype you are using and understand what that will give you...
Lossy compression - not lossy compression - many, many factors.
-
Feb 24th, 2006, 09:02 PM
#10
Re: Image Compression for Data Transfer
I wouldnt use any compression, I would just transfer the raw file, if you compress each frame before sending, then decompress at the client before showing, it will be slow and laggy/choppy. There shouldnt be a problem with the file size as its fairly small for a web cam viewer image anyway.
do you save the image to a disk before sending? or does it literally just grab the image from the cam
-
Feb 25th, 2006, 10:01 AM
#11
Thread Starter
New Member
Re: Image Compression for Data Transfer
exactly, that is what I had predicted would happen. I guess I will just send raw image data, although I was hoping to improve on the looks of the low-speed connection webcam users. Oh well, if it works it works.
-
Feb 25th, 2006, 11:47 AM
#12
Re: Image Compression for Data Transfer
For the low speed users, cant you grab a smaller resolution/lower quality image from the webcam, which will speed it up?
-
Feb 25th, 2006, 11:48 AM
#13
Thread Starter
New Member
Re: Image Compression for Data Transfer
well yah, that's the normal method - but that is kind of what I was trying to avoid. <shrugz>
-
Feb 25th, 2006, 11:57 AM
#14
Re: Image Compression for Data Transfer
Which was exactly my point...
Select a level of compression that is part processing the image.
Usually you cannot get "smaller" image data by compressing with something like zip. Usually to get smaller image data you need to sacrifice something - quality - color levels...
-
Feb 25th, 2006, 12:00 PM
#15
Thread Starter
New Member
Re: Image Compression for Data Transfer
Right on. Which image compression would you suggest?
-
Feb 25th, 2006, 12:06 PM
#16
Re: Image Compression for Data Transfer
What gets exposed to you when you read the image in VB? Are you using API or DLL calls that came with the webcam?
What is the make of the webcam?
-
Feb 26th, 2006, 11:36 AM
#17
Re: Image Compression for Data Transfer
I dont understand why you dont just send the raw jpeg data by the time its endoded the entire file in a compression system, then decoded at the other end, it will of defeated the purpose of using compression since the file probably could of been sent without compression quicker than with it
-
Feb 27th, 2006, 04:46 PM
#18
Thread Starter
New Member
Re: Image Compression for Data Transfer
You're probably right, although I think i'm going to give the dial-up clients the ability to buffer their images a few seconds with higher res images, or if not use lower res with no buffering. Dunno, that's why I posted the question here. Looking for the best method to accomplish this task, since it's my first attempt at streaming images between clients.
-
Feb 27th, 2006, 08:28 PM
#19
Re: Image Compression for Data Transfer
Yea i would try what you said and see if it is suitable
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|