Loading in 5 sec....

Histograms and MatchingPowerPoint Presentation

Histograms and Matching

- By
**morag** - Follow User

- 102 Views
- Updated On :

Histograms and Matching. 主講人：虞台文. Content. Overview Basic Histogram Structure Accessing Histograms Basic Manipulations with Histograms Color Spaces Histogram Comparisons Back Projection. Histograms and Matching. Overview. Histograms. Histogram of an Image. Histogram for Skin Color.

Related searches for Histograms and Matching

Download Presentation
## PowerPoint Slideshow about 'Histograms and Matching' - morag

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### Histograms and Matching

### Histograms and Matching

### Histograms and Matching

### Histograms and Matching

### Histograms and Matching

### Histograms and Matching

### Histograms and Matching

主講人：虞台文

Content

- Overview
- Basic Histogram Structure
- Accessing Histograms
- Basic Manipulations with Histograms
- Color Spaces
- Histogram Comparisons
- Back Projection

Overview

Applications

- Object Detection
- Image Retrieval
- Gesture Recognition

CvHistogram Multidimensional Histograms

typedef struct CvHistogram

{

int type;

CvArr* bins;

float thresh[CV_MAX_DIM][2]; // for uniform histograms

float** thresh2; // for nonuniform histograms

CvMatND mat; // embedded matrix header

// for array histograms

} CvHistogram;

Create Histogram

CvHistogram* cvCreateHist(

int dims,

int* sizes,

int type,

float** ranges = NULL,

int uniform = 1

);

Defer Set Ranges

Used when calling cvCreateHist with ranges = NULL.

Accessing Histograms

Direct Access of Bin Data

typedef struct CvHistogram

{

int type;

CvArr* bins;

float thresh[CV_MAX_DIM][2]; // for uniform histograms

float** thresh2; // for nonuniform histograms

CvMatND mat; // embedded matrix header

// for array histograms

} CvHistogram;

hist->mat.data.fl

Direct Access of Histogram Information

typedef struct CvHistogram

{

int type;

CvArr* bins;

float thresh[CV_MAX_DIM][2]; // for uniform histograms

float** thresh2; // for nonuniform histograms

CvMatND mat; // embedded matrix header

// for array histograms

} CvHistogram;

Basic Manipulations with Histograms

Calculate Histogram

void cvCalcHist(

IplImage** image,

CvHistogram* hist,

int accumulate=0,

const CvArr* mask=NULL

);

Example Graylevel Histogram

Color Spaces

Example Hue-Sat Histogram

Histogram Comparisons

Histogram Comparisons in OpenCV

#define CV_COMP_CORREL 0#define CV_COMP_CHISQR 1#define CV_COMP_INTERSECT 2#define CV_COMP_BHATTACHARYYA 3

Histogram Comparisons in OpenCV

Correlation Method

(CV_COMP_CORREL)

maximum

mismatch

perfect

match

#define CV_COMP_CORREL 0

#define CV_COMP_CHISQR 1

#define CV_COMP_INTERSECT 2

#define CV_COMP_BHATTACHARYYA 3

Histogram Comparisons in OpenCV

Chi-square Method

(CV_COMP_CHISQR)

perfect

match

bad

mismatch

#define CV_COMP_CORREL 0

#define CV_COMP_CHISQR 1

#define CV_COMP_INTERSECT 2

#define CV_COMP_BHATTACHARYYA 3

Histogram Comparisons in OpenCV

Intersection Method

(CV_COMP_INTERSECT)

H1 and H2 are normalized to one before comparing

total

mismatch

perfect

match

#define CV_COMP_CORREL 0

#define CV_COMP_CHISQR 1

#define CV_COMP_INTERSECT 2

#define CV_COMP_BHATTACHARYYA 3

Histogram Comparisons in OpenCV

BHATTACHARYYA Method

(CV_COMP_BHATTACHARYYA)

perfect

match

total

mismatch

#define CV_COMP_CORREL 0

#define CV_COMP_CHISQR 1

#define CV_COMP_INTERSECT 2

#define CV_COMP_BHATTACHARYYA 3

Back Projection

Back Projection

- Back projection is a way of recording how well the pixels or patches of pixels fit the distribution of pixels in a histogram model
- cvCalcBackProject()
- cvCalcBackProjectPatch()

Back Projection

- Back projection is a way of recording how well the pixels or patches of pixels fit the distribution of pixels in a histogram model
- cvCalcBackProject()
- cvCalcBackProjectPatch()

Download Presentation

Connecting to Server..