Find Jobs
Hire Freelancers

CUDA or GPU shader image comparison (learn and earn series)

$100-200 USD

In Progress
Posted almost 14 years ago

$100-200 USD

Paid on delivery
I need a bitmap comparison class that will utilize CUDA or GPU shaders on graphic cards to achieve maximum paralel performance. Class should be made usable from c# interface. ## Deliverables Purpose of software component for image comparison is video scene search. ? In order to do that, it is imperative that many comparison operations will be computed in as short time as possible. ? I have reference application that uses CPU for comparison, but practical application for it is impossible, since it is too slow. Software component should work in several phases, and here is the explanation of that phases: 1. Card Probing Component should be able to probe GPU so it can know various stuff about it - memory available, GPU architecture, ... 2. Setup Component should be informed in what format the BITMAPs will be given - format should be determined by bitmap size. ? Component should also be given instruction about internal representation of the bitmap on the GPU - it could be RGB24 or RGB565. Comparison theshold will be given at this time. 3. Images upload Multiple images should be uploaded and stored on the GPU. ? Component should report how many images can be uploaded further. ? Images should be rescaled/converted to target size/colorspace if necessery. 4. Comparison of single VS bunch of images One image for comparison against all of the images will be given, and in one instruction result vector should be given back giving the results of the comparison. 5. Step 4 will be run again and again, preserving uploaded bunch of the images made in step 3. 6. Step 3 will be used to upload new bunch of images to the card, and whole process will be repeated. Some method propositions: /// for setting the destination image format void SetImageFormat(int Width, int Height, ColorFormat Format); /// for setting the comparison treshold void SetTreshold(float Treshold); /// for uploading the picture (from the picture bunch) void UploadPicture(Bitmap Pic); /// for determining available picture memory int RemainingPictureSlotsAvailable(); /// for actual comparison float[] ComparePicture(Bitmap PictureToCompare); Result of the picture comparation for each picture pair is averaged RGB space distance of every pixel on the two images. Two pixels of RGB(0,0,0) have distance of 0.0 Pixels of RGB(0,0,0) and RGB(255,255,255) have distance of 1.0 Comparation treshold is cumulative average value that determines the bailout for the comparation. ? If during the pixel comparison current value goes above the treshold value, comparison is aborted and current value returned (which will be same or a little above the threshold value). Everything should be wrapped in c# casing, making it usable from .net environment. I will perform the testing by integrating the component in larger system that will run stated comparisons. ? Both accuracy and speed will be measured. **One observation regarding speed** ** ** **I find that using CUDA will greatly improve the speed of multiple comparisons, because of the following.** on-CPU comparison: To compare one image against 100 of them, you have to spend time 100U (let's say that U is time to compare one image against another) If you make 90.000 iterations of it (for one hour video that's the number of frames) you'll get 9.000.000U on GPU comparison To upload 100 images you'll use 100U again (providing that what you said about comparison and upload speed is true) - and will do that one time only for say one hour of video. In each of 90.000 iterations you'll use 1U to upload current frame, and unknown number of Us to compare that frame to the frames already on the GPU. So, the fact is that comparations should run in parallel on GPU so each frame comparation is done in far less then 100U. ? Let's say it can be done in 10U. 1U (for upload of the frame) + 10U for comparison = 11U 100U (first bunch upload) + 90.000x11U = 990.100U And that is 9x faster than the original on-CPU comparison. But I guess that 100 comparisons could be made even faster utilizing parallel nature of the GPU processors.
Project ID: 3430227

About the project

3 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$170 USD in 17 days
4.9 (24 reviews)
4.7
4.7
3 freelancers are bidding on average $156 USD for this job
User Avatar
See private message.
$127.50 USD in 17 days
5.0 (32 reviews)
5.9
5.9
User Avatar
See private message.
$170 USD in 17 days
4.5 (11 reviews)
2.8
2.8

About the client

Flag of CROATIA
Zagreb, Croatia
5.0
108
Payment method verified
Member since Dec 10, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.