List of usage examples for org.opencv.core Scalar toString
@Override
public String toString()
From source file:info.jmfavreau.bifrost.processing.CameraToSpeech.java
License:Open Source License
private void processImage(byte[] data, Camera camera) { Assert.assertNotNull(data);/*from w w w .j a va 2 s . co m*/ Assert.assertTrue(data.length != 0); Log.d("bifrost", "camera to speech"); // convert the raw data as a bitmap BitmapFactory.Options op = new BitmapFactory.Options(); op.inPreferredConfig = Bitmap.Config.ARGB_8888; Bitmap tmp = BitmapFactory.decodeByteArray(data, 0, data.length, op); // extract a series of colors from the image Scalar color = imageToColor.process(tmp); Log.d("bifrost", "color: " + color.toString()); // convert colors into semantic colors FuzzyColor fuzzyColor = new FuzzyColor(color); SemanticColor semanticColor = new SemanticColor(fuzzyColor); // speak speechEngine.speak(semanticColor.toString()); }