From 7faf772931aaa6f3bc07c29d8d701910e1f3fa40 Mon Sep 17 00:00:00 2001 From: "phishman3579@gmail.com" Date: Sun, 28 Aug 2011 18:20:53 +0000 Subject: [PATCH] Updated the RGB to HSL code to calucate correctly git-svn-id: https://android-motion-detection.googlecode.com/svn/trunk@8 996b93ed-3e4d-4b21-1044-74bd19560d1d --- .../MotionDetectionActivity.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/com/jwetherell/motion_detection/MotionDetectionActivity.java b/src/com/jwetherell/motion_detection/MotionDetectionActivity.java index c63ca1f..7f244ed 100644 --- a/src/com/jwetherell/motion_detection/MotionDetectionActivity.java +++ b/src/com/jwetherell/motion_detection/MotionDetectionActivity.java @@ -50,27 +50,6 @@ public void onCreate(Bundle savedInstanceState) { previewHolder = preview.getHolder(); previewHolder.addCallback(surfaceCallback); previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); - - int r = 255; - int g = 0; - int b = 0; - float[] HSL = ImageProcessing.convertToHSL(r, g, b); - String out = "r="+r+" g="+g+" b="+b+" h="+(HSL[ImageProcessing.H])+" s="+(HSL[ImageProcessing.S])+" l="+(HSL[ImageProcessing.L]); - Log.d(TAG, out); //HSL: 0° 100% 50% - - r = 0; - g = 255; - b = 0; - HSL = ImageProcessing.convertToHSL(r, g, b); - out = "r="+r+" g="+g+" b="+b+" h="+(HSL[ImageProcessing.H])+" s="+(HSL[ImageProcessing.S])+" l="+(HSL[ImageProcessing.L]); - Log.d(TAG, out); //HSL: 120° 100% 50% - - r = 0; - g = 0; - b = 255; - HSL = ImageProcessing.convertToHSL(r, g, b); - out = "r="+r+" g="+g+" b="+b+" h="+(HSL[ImageProcessing.H])+" s="+(HSL[ImageProcessing.S])+" l="+(HSL[ImageProcessing.L]); - Log.d(TAG, out); //HSL: 240° 100% 50% } @Override