Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast RGB to HSL convertion?

How is it possible to speed up the software convertion from RGB to HSL?

I found that this is a very time demanding task (about 70 msec on my PC). Is it possible to have such a convertion in less than 20 msec? Maybe a multiprocessor computer could solve the problem?

0 Kudos
Message 1 of 3
(4,434 Views)

Hi andrea,

 

I need some more information in order to better help you. For example:

  • In which language are you programming? LabVIEW, CVI, VB6?
  • Which function are you using? I suppose it's the IMAQ Cast Image....

 

If you're working in LabVIEW, the following example could be a common benchmark test:

 

How Do I Convert a Color Image to Grayscale?

 

Hope this helps,

 

Best Regards,

 

Fabio

Fabio M.
NI
Principal Engineer
0 Kudos
Message 2 of 3
(4,413 Views)

Hi Mario,

 I am working with LabView+Vision 8.0. Actually I need to apply a color threshold with HSL as "method". I found that this thresholding takes a long time to perform the task if the input image is an RGB-image; I guess that this is because this function first convert the image in the HSL-format, in fact casting the image first in the HSL-format and passing this HSL-image to the color-threshold function results in very little time demand from the thresholding function, but it is now the cast-image function that takes a long time to perform (about 60-70 msec on my PC).

 

Thank you for any kind of suggestion.

0 Kudos
Message 3 of 3
(4,404 Views)