ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Mean of R color values

解決済み
解決策を見る

Hi there,

 

 I am using the read jpg sub vi, I take the image data and after I decimate the array, three vetors each of each corresponding  to R ,G  and B are created.  I calculate the mean value of R in the way shown in my attached program and I find two different values. Can one one explain why that happens?

 

Thank you

0 件の賞賛
メッセージ1/3
2,833件の閲覧回数
解決策
トピック作成者vlonjatiが受理

It would be better if you put real data into your input array, make that data the default values for the array, then save the file and upload.

 

How many elements are in your array?

 

If you have only 2 elements, then the top mean calculates the mean of those 2.  Your formula node creates a 256 element array that is filled with zeroes.  So only as many elements in your first array will get placed into the new array.  All remaining elements will remain zero, but they will factor into the calculation of the mean.

0 件の賞賛
メッセージ2/3
2,810件の閲覧回数

Hi Ravens Fan,

 

Thank you for your answer, that was a stupid mistake, now that I check the size of R it is 480000 which correspond to the size of 800X600 pixel, i.e. of the picture.

 

0 件の賞賛
メッセージ3/3
2,785件の閲覧回数