Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: ui/gfx/color_analysis.h

Issue 12220123: Adds a function computing image color covariance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/color_analysis.cc » ('j') | ui/gfx/color_analysis.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_analysis.h
diff --git a/ui/gfx/color_analysis.h b/ui/gfx/color_analysis.h
index 6201874e80c3c2aadfab0fff01b65a3d1bec3152..a61f75f6ba62221746ff17734fa5614b0460cdac 100644
--- a/ui/gfx/color_analysis.h
+++ b/ui/gfx/color_analysis.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted_memory.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ui_export.h"
+#include "ui/gfx/matrix3_f.h"
class SkBitmap;
@@ -98,6 +99,11 @@ UI_EXPORT SkColor CalculateKMeanColorOfPNG(
// reasonable defaults for |darkness_limit|, |brightness_limit| and |sampler|.
UI_EXPORT SkColor CalculateKMeanColorOfBitmap(const SkBitmap& bitmap);
+// Compute color covariance matrix for the input bitmap. 4x4 matrix is used
Alexei Svitkine (slow) 2013/02/12 19:19:29 Your comment about a 4x4 matrix being used for the
motek. 2013/02/12 19:28:56 Done.
+// as the return type for convenience (easier to apply to 3d points). Only 3
+// first dimensions are used (correspond to RGB channels).
+UI_EXPORT gfx::Matrix3F ComputeColorCovariance(const SkBitmap& bitmap);
+
} // namespace color_utils
#endif // UI_GFX_COLOR_ANALYSIS_H_
« no previous file with comments | « no previous file | ui/gfx/color_analysis.cc » ('j') | ui/gfx/color_analysis.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698