summaryrefslogtreecommitdiffstats
path: root/chrome/browser/thumbnails/content_analysis.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 11:04:04 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 11:04:04 +0000
commit5fec04903efc218ec3f13f3e0f7d6d3196893061 (patch)
treed5792c6548d2a094e2ab0a3142f7199f4db42de0 /chrome/browser/thumbnails/content_analysis.h
parentf70c93f02347ae1a0864d6a854329a815ec30dcf (diff)
downloadchromium_src-5fec04903efc218ec3f13f3e0f7d6d3196893061.zip
chromium_src-5fec04903efc218ec3f13f3e0f7d6d3196893061.tar.gz
chromium_src-5fec04903efc218ec3f13f3e0f7d6d3196893061.tar.bz2
Revert 194565 "Complete (but inefficient) implementation of the ..."
> Complete (but inefficient) implementation of the image retargetting method. > > This CL contains: > 1. Convolution of arbitrary channel with arbitrary kernel (convolver*). > 2. Gaussian gradient magnitude implementation. > 3. Image profile (X and Y projections) computations. > 4. Otsu-like thresholding of profiles. > 5. Image decimation. > 6. The main routine which binds it all together. > > Note: 1 and 2 do work, but remain main sources of suckiness due to performance > problems. I actively work on this. Still, I'd love to get the current state in > to establish a baseline and for viewing pleasure of those who are interested. > > BUG=155269 > > Review URL: https://codereview.chromium.org/13947013 TBR=motek@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/thumbnails/content_analysis.h')
-rw-r--r--chrome/browser/thumbnails/content_analysis.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/chrome/browser/thumbnails/content_analysis.h b/chrome/browser/thumbnails/content_analysis.h
deleted file mode 100644
index e65ff02..0000000
--- a/chrome/browser/thumbnails/content_analysis.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_
-#define CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/base/ui_export.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
-
-class SkBitmap;
-
-namespace thumbnailing_utils {
-
-// Compute in-place gaussian gradient magnitude of |input_bitmap| with sigma
-// |kernel_sigma|. |input_bitmap| is requried to be of SkBitmap::kA8_Config
-// type. The routine computes first-order gaussian derivative on a
-// gaussian-smoothed image. Beware, this is fairly slow since kernel size is
-// 4 * kernel_sigma + 1.
-void ApplyGaussianGradientMagnitudeFilter(SkBitmap* input_bitmap,
- float kernel_sigma);
-
-// Accumulates vertical and horizontal sum of pixel values from a subsection of
-// |input_bitmap| defined by |image_area|. The image is required to be of
-// SkBitmap::kA8_Config type.
-// If non-empty |target_size| is given, the routine will use it to process the
-// profiles with closing operator sized to eliminate gaps which would be smaller
-// than 1 pixel after rescaling to |target_size|.
-// If |apply_log| is true, logarithm of counts are used for morhology (and
-// returned).
-void ExtractImageProfileInformation(const SkBitmap& input_bitmap,
- const gfx::Rect& image_area,
- const gfx::Size& target_size,
- bool apply_log,
- std::vector<float>* rows,
- std::vector<float>* columns);
-
-// Compute a threshold value separating background (low) from signal (high)
-// areas in the |input| profile.
-float AutoSegmentPeaks(const std::vector<float>& input);
-
-// Shrinks the source |bitmap| by removing rows and columns where |rows| and
-// |columns| are false, respectively. The function returns a new bitmap if the
-// shrinking can be performed and an empty instance otherwise.
-SkBitmap ComputeDecimatedImage(const SkBitmap& bitmap,
- const std::vector<bool>& rows,
- const std::vector<bool>& columns);
-
-// Creates a new bitmap which contains only 'interesting' areas of
-// |source_bitmap|. The |target_size| is used to estimate some computation
-// parameters, but the resulting bitmap will not necessarily be of that size.
-// |kernel_sigma| defines the degree of image smoothing in gradient computation.
-// For a natural-sized (not shrunk) screenshot at 96 DPI and regular font size
-// 5.0 was determined to be a good value.
-SkBitmap CreateRetargettedThumbnailImage(const SkBitmap& source_bitmap,
- const gfx::Size& target_size,
- float kernel_sigma);
-
-} // namespace thumbnailing_utils
-
-#endif // CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_