Skip to content

Commit

Permalink
Updated the RGB to HSL code to calucate correctly
Browse files Browse the repository at this point in the history
git-svn-id: https://android-motion-detection.googlecode.com/svn/trunk@11 996b93ed-3e4d-4b21-1044-74bd19560d1d
  • Loading branch information
[email protected] committed Aug 28, 2011
1 parent c334537 commit a4fe01b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static float getBrightnessAtPoint(int pixel) {
l *= 100;

//Convert the HSL into a single "brightness" representation
return (float)(l * 0.5 + ((h / 360) * 50));
return (float)((l * 0.5) + ((h / 360) * 50));
}

public static int[] decodeYUV420SP(byte[] yuv420sp, int width, int height) {
Expand Down

0 comments on commit a4fe01b

Please sign in to comment.