Results 1 to 5 of 5

Thread: Quickest way to read through a picture? [vb.net 2005]

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    12

    Quickest way to read through a picture? [vb.net 2005]

    In VB.net 2005 what is the quickest way to read through an image? I currently have a class taking images from my webcam then it processes them and does stuff with them.(sort of like filters) I'd like for them to move a little smoother...

    Is there a quicker way to go through an image than to just go pixel by pixel? While still keeping quality? Because I know I can make it go average of every 10 pixel but the webcam images are bad enough quality I don't need that making it worse...

    Is there any other way?

    Thanks,
    Alex

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    12

    Re: Quickest way to read through a picture? [vb.net 2005]

    I know this is old but I still have not found a solution. Any ideas?

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Quickest way to read through a picture? [vb.net 2005]

    It'd be alot easier if we knew exactly what you are doing with the image. If you are applying a color to the image it could be done extremely faster with the help of the ColorMatrix class.
    If you are using the data of each pixel in another way, and want to use 100% VB.NET, you'd use the LockBits method of the bitmap to lock it into memory, and read/write pixel data directly from memory using the Marshal class.
    If you wouldnt mind using a second language, you could write a DLL in C/C++ to process the image. This would be alot faster than using only VB.NET
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    12

    Re: Quickest way to read through a picture? [vb.net 2005]

    I could do a DLL that is written in C++ I'm not sure how that works though? But what I have right now is a program that uses a class I found to take input from my webcam. From there I turn the pixels that have a red value less then a threshold black and above that red. It's just experimentation currently in playing around with a live filter for my webcam. But without the filter its fast as hell and when the filters are added it's disgustingly slow lol. So how would you go about writing the DLL in C++? I know C++ but not sure how to do the DLL?

    Thanks,
    Alex

  5. #5
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Quickest way to read through a picture? [vb.net 2005]

    Create a C++ Win32 Project. When the wizard comes up, select DLL as application type and check the "Empty project" checkbox.

    In order to create functions that'll be available for others to use you need to export the functions, like this:
    C++ Code:
    1. "extern "C"{
    2. __declspec(dllexport) void MyMethod(int someParameter){
    3.      // Code.
    4. }
    5. }
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

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