|
-
Jun 17th, 2010, 11:38 PM
#1
Thread Starter
Addicted Member
Webcam Image Capture
Hi Friends,
I want to develop a simple webcam image capture application in asp.net ( vb.net ). The camera output is 320x240. But I want the image in 240x320 size.
When I try to resize the 320x240 image, the image stretches vertically and looks pretty bad.
I would be grateful if someone could help me with the code to do this and upload the resultant 240x320 image.
Thanking You,
Sid.
THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.
-
Jun 18th, 2010, 12:34 AM
#2
Re: Webcam Image Capture
You may be considering using it with Silvelight
Please mark you thread resolved using the Thread Tools as shown
-
Jun 18th, 2010, 01:03 AM
#3
Thread Starter
Addicted Member
-
Jun 18th, 2010, 01:26 AM
#4
Re: Webcam Image Capture
At the end of the day, trying to convert an image from 320x240 to 240x320, is always going to result in some form of stretching and distortion, as they are two completely different aspects of the same image.
Can you show the code that you are currently using, and also some samples of the images that you are getting?
Gary
-
Jun 18th, 2010, 02:18 AM
#5
Thread Starter
Addicted Member
Re: Webcam Image Capture
Hi,
Here is the javascript code I use :- ( i am using and ActiveX component to capture images on client side )
'-------This is the calling page----------------------------'
<script type="text/javascript" language="javascript">
function OpenCamFrame()
{
var WinSettings = "center:yes;resizable:no;dialogHeight:300px;dialogWidth:200px";
var MyArgs = window.showModalDialog("../master/Camera.aspx",inputArgs,WinSettings);
}
'---------This is the called dialog page where the ActiveX component is-----
<object id="EZVIDC60" name="EZVIDC60" classid="clsid F6D6569-5B0C-11D3-9396-008029E9B3A6">
</object>
<script type="text/javascript">
var inputArgs;
function CaptureFrame()
{
//var fileName = inputArgs[0].toString() + inputArgs[1].toString() + inputArgs[2].toString();
var fileName = "15111983";
form1.EZVIDC60.CapSingleFrame();
form1.EZVIDC60.SaveDIB("C:\\" + fileName + ".dib");
form1.imgConverter.ConvertBMPtoJPG("C:\\" + fileName + ".dib","C:\\" + fileName + ".jpg");
}
</script>
The image gets stored in 320x240 format on the client machine.
THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.
-
Jun 18th, 2010, 02:24 AM
#6
Re: Webcam Image Capture
OK, I think I must be missing something..
I thought you said you had code that was doing the resizing? I don't see it?
Gary
-
Jun 18th, 2010, 03:41 AM
#7
Thread Starter
Addicted Member
Re: Webcam Image Capture
Hi Gary,
Yes, the code that does the resizing is just one line...
Its another activeX component...
Its also used through javascript.
Its like this,
Imagex1.Load("existing file path");
Imagex1.Resize("new filepath")'
Regards,
Sid
THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.
-
Jun 18th, 2010, 03:43 AM
#8
Thread Starter
Addicted Member
-
Jun 18th, 2010, 03:53 AM
#9
Re: Webcam Image Capture
So what you are saying is, the ActiveX control that you are using is not doing a good job, is that right?
So without using another control, or doing the resizing yourself, or using another technology (as suggested earlier), you are not going to be able to fix this.
Is that ActiveX control under your control? Are you able to edit it?
Gary
-
Jun 18th, 2010, 04:43 AM
#10
Thread Starter
Addicted Member
Re: Webcam Image Capture
Hi Gary,
This is a third party activeX control
Moreover, the problem lies with the Camera
capturing 320x240 images ( even when i resize the
capture frame to 240x320 ).
Please suggest if you know a method to build a
fixed frame to CROP the image and save it to client
machine.
I have tried a lot and put in lot of efforts but cant figure
out a way.
Regards,
Sid
THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.
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
|