DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: maybe some can convert this

  1. #1
    Torsten Rienow Guest

    maybe some can convert this

    see below for the attachments

    BCFGRAY.BAS is powerbasic code. do not
    add it to the vb project.
    BCFGRAY.DLL is the dll made from
    bcfgray.bas. copy this dll to you app.path or
    vb.path or system32.path

    put an image in picture1 to see some real
    grayscaling.

    i want to show you something i am working on.
    a common problem in my work is to grayscale
    a colour image. in dusk or darknes, colour cameras
    very often has a very noisy output. to get a
    more reliable motion detection it is very help-
    full to grayscale an image before the image is
    sent to the motion detector.

    i need and like speed in program execution.
    i have a 900 duron with 128 mb ram. if you
    do not see significant speed differences, then
    put a larger image into picture1.
    on my box pb takes 0 to 10 ms, vb takes
    above 80 ms per convert.
    in other words with vb i can make 12 converts
    per second, with pb 100 converts per second.
    and i really need the speed.

    i have added a small vb app and a powerbasic
    dll with full sourcecode. you may use and deploy
    the sourcecode and the dll in any way you like.

    i ask you for the performance of the pb native
    code compared to the vb native code.

    i ask you for porting the vb code to vb.net

    my customer does not allowes me to post the
    pb inline assembler (mmx powered) version
    of the grayscale routine. but belive me. the
    mmx version is agin 10 times faster then pb native
    code version.


    unpack instructions, seems tha attachments are not allowed here
    1. open notepad
    2. copy the uuecoded stuff into notepad
    3. save the notepadfile to a .uue file
    4. open the uue file with winzip
    5. unzip the unknown.001 file
    6. rename the unknown.001 file to unknown.zip
    7. unzip unknow.zip

    UEsDBBQAAgAIAG2Yiyox/4PU2wUAANkWAAALAAAAZnJtTWFpbi5mcm3dWFtz2jgUfu9M/4OGhxa2
    KWMISclDHjDkwjQENiR085SRbYVoI8seWW7C/vo9smxZBuNmZ9qHLTMJWN93js5NR5JXZzfL6fwa
    HXUd5/07l6wpRyu3ex6JED2KcIbh+f07hNAYx5JGHBWfU/hrueNztIgol0SgCQmjlqYySri8JHT9
    JAvqYHjoWOAVeZSlnmMbuo1ia4rDwZGFfaOBfDLYyZcTDV5R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j6Ok5u7zbf
    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vRd0DgI9DXQM6EWgSaAEUCboLAe6A6gEaD0QDTQA9BugIaCTQK8B5UBA
    X0koNt8A/mMgdZJvtHyz/ZbZGsoclYQl32a3I1RFOWsoe4qrtVNlG+pT3AYX5UzVESJ9gaB3XYu/
    zecFjuruSD1EgKvwccH2ig6ft5yjaS+DIXSvlyUDO3dCA3uH31umIJR/VwcT8O/0+lkXy8CLJliW
    1LW3BFmKYeBVo/DVgTbOl+wvpeNiWxiW66z004GkPeV9hAGFb4DOOwJ+qluW+wLbWnxlPvyfQoqr
    YLzYfVQNjrds95Z7vZ3AOb0tbdh9JNe313Z6/VXe+xUrwMtDBwA/5PAY2mrplDbmsdfgborHIvmh
    5mWSyBfG5vIpfYLrsmvKPJTfz3rtXr+CYycVWOGvVkFupoP1Jl2AUdd3tN5HBjg/e639fTupbPw9
    xMJdiKkd+E6gbqA+E0J3wldoD9QHCOXWLCcr7nWWNcnLb68sry6rrEGOcgz9By8Ak/L/lm81s/rB
    1WRBrOC1gqkCr4WzxCyvW+YsacT1hJu4h9hE3EfcVri2sHvNmcIPCx+zeAqfLbyr8NeWkbsG776h
    qKZoVdHdRXTRA0Xf3qj/W+mfUEsBAhQAFAACAAgAbZiLKjH/g9TbBQAA2RYAAAsAAAAAAAAAAQAg
    ALaBAAAAAGZybU1haW4uZnJtUEsBAhQAFAACAAgAbZiLKsOZ3OqZAQAAkwIAAAsAAAAAAAAAAQAg
    ALaBBAYAAEJDRkdSQVkudmJwUEsBAhQAFAACAAgAZSWKKvIK83ReAgAAkAYAAAsAAAAAAAAAAQAg
    ALaBxgcAAGJjZmdyYXkuYmFzUEsBAhQAFAACAAgAAR2KKgq6QK+KCgAAABYAAAsAAAAAAAAAAAAg
    ALaBTQoAAGJjZmdyYXkuZGxsUEsFBgAAAAAEAAQA5AAAAAAVAAAAAA==




  2. #2
    Zane Thomas Guest

    Re: maybe some can convert this

    Torsten,

    >see below for the attachments


    Posting entire projects now for conversion? Go do your homework yourself,
    and don't post attachments on the ng any more. Geesh.


    ---
    Ice Z - Straight Outta Redmond

  3. #3
    Torsten Rienow Guest

    Re: maybe some can convert this

    i do just my homework. one part of it is to explore the
    things ongoing now and in the future. i have to make
    decissions for me and my customers.
    the above topic shows my dilemma. maybe someone
    is willing to look into the attachment. he will see some
    line of vb6 code. this code works perfect. he will see
    that not only api needs pointers, third party dll's may
    need them too, like the one i made and posted.

    zane,
    if you have something to tell to my originally question
    then your answer is welcome. btw, you can cast it
    as multiple choise.

    (a) yes
    (b) no

    but do not blame me not doing my homework.

    a tip for you, some intelligence testing
    if you ever get a sheet of paper with 100 stupid questions
    or orders, read always o the end before beginning to make
    answers or executes. maybe order 99 is
    "forget all the bullshit you have seen from 1 to 98"
    and order 100 is
    "take this sheet into paperbin"

    zane,
    have you tested the code?



  4. #4
    Zane Thomas Guest

    Re: maybe some can convert this

    On Wed, 11 Apr 2001 20:41:49 +0200, "Torsten Rienow"
    <torsten.rienow@bcf.de> wrote:

    >maybe someone is willing to look into the attachment


    And maybe that someone will be you ... nah, guess not.



    ---
    Ice Z - Straight Outta Redmond

  5. #5
    Mattias Sjögren Guest

    Re: maybe some can convert this

    Torsten,

    >put an image in picture1 to see some real
    >grayscaling.


    Grayscale? The images don't become gray at all on my machine. Just
    darn ugly.


    >i need and like speed in program execution.


    So why are you doing floating point math in your algorithm? It's
    faster to multiply by 299 and then divide by 1000, than to multiply by
    0.299 you know.


    >i have a 900 duron with 128 mb ram. if you
    >do not see significant speed differences, then
    >put a larger image into picture1.
    >on my box pb takes 0 to 10 ms, vb takes
    >above 80 ms per convert.


    With the above change to the VB code, and appropriate optimization
    settings set, the VB version ran faster than the PB DLL version. With
    a 3.8 Mb bitmap, on my Celeron 433 w/ 192 Mb, the VB code took about
    90 ms and the DLL calls about 120 ms. (BTW, GetTickCount isn't exactly
    the most accurate timing method available either).

    Of course that's an unfair comparison, since you could switch to
    integer math in the DLL too. But at least it proves that you can make
    the VB code much faster.


    >i ask you for porting the vb code to vb.net


    What Zane said.

    And I really don't see why you want to move the code to VB.NET at all.
    If you already have a perfectly good PB DLL, then keep using it. It
    will no doubt be faster than what VB.NET can give you.


    Mattias

    ====================================
    Mattias Sjögren - mattias @ mvps.org
    http://www.msjogren.net/dotnet/

    CodeHound - The Software Developer's Search Engine
    http://www.codehound.com

  6. #6
    Torsten Rienow Guest

    Re: maybe some can convert this

    >And I really don't see why you want to move the code to VB.NET at all.
    >If you already have a perfectly good PB DLL, then keep using it. It
    >will no doubt be faster than what VB.NET can give you.


    i do NOT want to CHANGE my dll with vb.net,
    i want to USE my dll with vb.net





  7. #7
    Zane Thomas Guest

    Re: maybe some can convert this

    On Wed, 11 Apr 2001 21:20:02 GMT, mattias.dont.want.spam@mvps.org (Mattias
    Sjögren) wrote:

    >So why are you doing floating point math in your algorithm?


    ROFLMAO!!! You've got to be kidding. Heh, guess I'm glad you wasted your
    time looking into his problem.


    ---
    Ice Z - Straight Outta Redmond

  8. #8
    David Haskell Guest

    Re: maybe some can convert this

    Torsten,

    > >And I really don't see why you want to move the code to VB.NET at all.
    > >If you already have a perfectly good PB DLL, then keep using it. It
    > >will no doubt be faster than what VB.NET can give you.

    >
    > i do NOT want to CHANGE my dll with vb.net,
    > i want to USE my dll with vb.net


    Really now, a simple "Thank you" would have sufficed.



  9. #9
    Torsten Rienow Guest

    Re: maybe some can convert this

    yes, right before mattias posting,

    VB Code
    Y = (0.299 * InBuf(i)) + (0.587 * InBuf(i + 1)) + (0.114 * InBuf(i + 2))

    PB Code
    Y = (9798 * InBuf(i)) + (19235 * InBuf(i + 1)) + (3736 * InBuf(i + 2))
    SHIFT RIGHT Y, 15


    But i was afraid that you do not know what bit shifting is. have you ever
    used it?



    "Zane Thomas" <zane@mabry.com> schrieb im Newsbeitrag
    news:3b2af8a1.342942609@news.devx.com...
    > On Wed, 11 Apr 2001 21:20:02 GMT, mattias.dont.want.spam@mvps.org (Mattias
    > Sjögren) wrote:
    >
    > >So why are you doing floating point math in your algorithm?

    >
    > ROFLMAO!!! You've got to be kidding. Heh, guess I'm glad you wasted your
    > time looking into his problem.
    >
    >
    > ---
    > Ice Z - Straight Outta Redmond




  10. #10
    Torsten Rienow Guest

    Re: maybe some can convert this

    you are right david,

    thank you mattias for you very constructive topic

    "David Haskell" <NOhaskellsSPAM@pacbell.net> schrieb im Newsbeitrag
    news:3ad59e5f$1@news.devx.com...
    > Torsten,
    >
    > > >And I really don't see why you want to move the code to VB.NET at all.
    > > >If you already have a perfectly good PB DLL, then keep using it. It
    > > >will no doubt be faster than what VB.NET can give you.

    > >
    > > i do NOT want to CHANGE my dll with vb.net,
    > > i want to USE my dll with vb.net

    >
    > Really now, a simple "Thank you" would have sufficed.
    >
    >




  11. #11
    Torsten Rienow Guest

    Re: maybe some can convert this

    for me floting point is more exact



    "Torsten Rienow" <torsten.rienow@bcf.de> schrieb im Newsbeitrag
    news:3ad5add6$1@news.devx.com...
    > yes, right before mattias posting,
    >
    > VB Code
    > Y = (0.299 * InBuf(i)) + (0.587 * InBuf(i + 1)) + (0.114 * InBuf(i + 2))
    >
    > PB Code
    > Y = (9798 * InBuf(i)) + (19235 * InBuf(i + 1)) + (3736 * InBuf(i + 2))
    > SHIFT RIGHT Y, 15
    >
    >
    > But i was afraid that you do not know what bit shifting is. have you ever
    > used it?
    >
    >
    >
    > "Zane Thomas" <zane@mabry.com> schrieb im Newsbeitrag
    > news:3b2af8a1.342942609@news.devx.com...
    > > On Wed, 11 Apr 2001 21:20:02 GMT, mattias.dont.want.spam@mvps.org

    (Mattias
    > > Sjögren) wrote:
    > >
    > > >So why are you doing floating point math in your algorithm?

    > >
    > > ROFLMAO!!! You've got to be kidding. Heh, guess I'm glad you wasted

    your
    > > time looking into his problem.
    > >
    > >
    > > ---
    > > Ice Z - Straight Outta Redmond

    >
    >




  12. #12
    Torsten Rienow Guest

    Re: maybe some can convert this

    zane,
    forget what i am doing with the dll. this
    is my business since years.
    make me happy and tell me that i can use the dll
    in vb.net.
    If you can show me in brief, how i can use the
    dll vb.net my great thanks for you are granted.



    "Torsten Rienow" <torsten.rienow@bcf.de> schrieb im Newsbeitrag
    news:3ad494bb@news.devx.com...
    > see below for the attachments
    >
    > BCFGRAY.BAS is powerbasic code. do not
    > add it to the vb project.
    > BCFGRAY.DLL is the dll made from
    > bcfgray.bas. copy this dll to you app.path or
    > vb.path or system32.path
    >
    > put an image in picture1 to see some real
    > grayscaling.
    >
    > i want to show you something i am working on.
    > a common problem in my work is to grayscale
    > a colour image. in dusk or darknes, colour cameras
    > very often has a very noisy output. to get a
    > more reliable motion detection it is very help-
    > full to grayscale an image before the image is
    > sent to the motion detector.
    >
    > i need and like speed in program execution.
    > i have a 900 duron with 128 mb ram. if you
    > do not see significant speed differences, then
    > put a larger image into picture1.
    > on my box pb takes 0 to 10 ms, vb takes
    > above 80 ms per convert.
    > in other words with vb i can make 12 converts
    > per second, with pb 100 converts per second.
    > and i really need the speed.
    >
    > i have added a small vb app and a powerbasic
    > dll with full sourcecode. you may use and deploy
    > the sourcecode and the dll in any way you like.
    >
    > i ask you for the performance of the pb native
    > code compared to the vb native code.
    >
    > i ask you for porting the vb code to vb.net
    >
    > my customer does not allowes me to post the
    > pb inline assembler (mmx powered) version
    > of the grayscale routine. but belive me. the
    > mmx version is agin 10 times faster then pb native
    > code version.
    >
    >
    > unpack instructions, seems tha attachments are not allowed here
    > 1. open notepad
    > 2. copy the uuecoded stuff into notepad
    > 3. save the notepadfile to a .uue file
    > 4. open the uue file with winzip
    > 5. unzip the unknown.001 file
    > 6. rename the unknown.001 file to unknown.zip
    > 7. unzip unknow.zip
    >
    >

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




  13. #13
    Zane Thomas Guest

    Re: maybe some can convert this

    On Thu, 12 Apr 2001 15:33:58 +0200, "Torsten Rienow"
    <torsten.rienow@bcf.de> wrote:

    >But i was afraid that you do not know what bit shifting is. have you ever
    >used it?


    BWAHAHAHAH!!!


    ---
    Ice Z - Straight Outta Redmond

  14. #14
    Zane Thomas Guest

    Re: maybe some can convert this

    On Thu, 12 Apr 2001 15:47:42 +0200, "Torsten Rienow"
    <torsten.rienow@bcf.de> wrote:

    >for me floting point is more exact


    You must have taken the same correspondence course that Mike Mitchell
    took. Properly scaled integer arithmetic of a precision appropriate for
    the job at hand loses _no_ precision.




    ---
    Ice Z - Straight Outta Redmond

  15. #15
    Sjoerd Verweij Guest

    Re: maybe some can convert this

    > >for me floting point is more exact
    > You must have taken the same correspondence course that Mike Mitchell
    > took.


    That's harsh :-)

    Anyway, maybe this'll help:
    http://home.earthlink.net/~bruce211/mathlib.html




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center