LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RGB to YPrPb

Dear LabVIEW programmers.

 

I am trying to make an application that is taking images and is generating sound according to the ROBOT36 SSTV standard.

I have reach the first problem, the computation of R-Y and B-Y (or the YPrPb components, Y component was easy)

 

My problem is that quite often the Y is higher than B, or R and the value is negative. I use unsigned 8 numbers to represent values.

I could use double but I get to another issue since the standard is stating that the signal frequency vary from 1500Hz to 2300 depending on component amplitude - and I can't go lower than 1500Hz.

 

So, how should I solve this problem of negative R-Y and B-Y ???

 

Please help.

 

Andrei

0 Kudos
Message 1 of 4
(2,737 Views)

Since B-Y and R-Y must necessarily handle both negative and positive numbers, you must use a representation that can handle negative numbers.

Some choices are I8 (handles -128 to +127) and I16 (handles -32768 to +32767).

0 Kudos
Message 2 of 4
(2,730 Views)

Another possibility is to use fixed-point format numbers.  See attached VI.

0 Kudos
Message 3 of 4
(2,726 Views)

Hi pcardinale,

 

I thing that is the only solution possible.

In this case a 0 value should mean 1900Hz and the maximum negative value 1500Hz and the maximum positive value 2300Hz.

I will have to see it live if it works.

 

Best regards,

 

Andrei

0 Kudos
Message 4 of 4
(2,718 Views)