Results 1 to 10 of 10

Thread: Webcam Image Capture

  1. #1

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Question 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.

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Webcam Image Capture

    You may be considering using it with Silvelight
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Question Re: Webcam Image Capture

    Hi,

    We are not using silverlight..
    Please suggest if there is alternative way

    -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.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  5. #5

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Question 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="clsidF6D6569-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.

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  7. #7

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Question 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.

  8. #8

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Re: Webcam Image Capture

    Oh...I missed all the arguments...
    Its like this..

    Imagex1.Resize(width, height, "new file path");
    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.

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  10. #10

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Question 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
  •  



Click Here to Expand Forum to Full Width