source: eviacam/trunk/fuentes/creavision/crvhistogram.h @ 567

Last change on this file since 567 was 567, checked in by mabarracus, 4 years ago

updated sources to version 2.0.3

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        crvhistogram.h
3// Purpose: 
4// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
5// Modified by:
6// Created:     30/05/2008
7// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
8//
9//  This program is free software: you can redistribute it and/or modify
10//  it under the terms of the GNU General Public License as published by
11//  the Free Software Foundation, either version 3 of the License, or
12//  (at your option) any later version.
13//
14//  This program is distributed in the hope that it will be useful,
15//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//  GNU General Public License for more details.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21/////////////////////////////////////////////////////////////////////////////
22#ifndef CRVHISTOGRAM_H
23#define CRVHISTOGRAM_H
24
25#include <cv.h>
26
27typedef unsigned char TCrvLookupTable[256];
28typedef int TCrvHistogram[256];
29
30// Calcula l'histograma d'una imatge
31void crvHistogram (IplImage *srcImg, TCrvHistogram &his);
32
33// Calcula on comença i acaba un histograma. Retorna
34// false si l'histograma és buit (tot zeros)
35bool crvHistogramBeginEnd (TCrvHistogram &his, unsigned char &begin, unsigned char &end);
36
37// Aplica a una imatge de grisos la transformació que imposa la
38// lookup-table passada com a paràmetre (té en compte ROI)
39void crvLUTTransform (IplImage *srcImg, IplImage *dstImg, TCrvLookupTable &lut);
40
41// Genera la LUT per normalitzar una imatge a partir del seu
42// histograma. Retorna la mida de l'histograma
43int crvNormalizeHistogram (TCrvHistogram &his, TCrvLookupTable &lut, unsigned char minRange= 0);
44
45// Normalitza una imatge en escala de grisos (impl. lenta)
46// Retorna mida histograma original
47int crvNormalize (IplImage *src, IplImage *dst);
48
49#endif
Note: See TracBrowser for help on using the repository browser.