KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
channels.h
Go to the documentation of this file.
1 // channels.h - separate an image of longs into many binary images
3 // Author: Doron Tal
4 // Date Created: March, 2000
5 
6 #ifndef _CHANNELS_H
7 #define _CHANNELS_H
8 
9 #include "wrap_dtlib_cpp/img.h"
10 
11 /*
12  * Kobus: We have run into trouble with 32 bit centric code in this
13  * distribution. I have changed some long's to kjb_int32's. The immediate
14  * problem is that the segmentation maps can get written out as 64 bit integers.
15 */
16 #include "l/l_sys_def.h"
17 
18 #warning "[Code police] Do not put 'using namespace' in global scope of header."
19 using namespace kjb_c;
20 
21 
22 namespace DTLib {
23 
24  // PRECOND: (1) 'CombImg' is zero indexed and has consecutive integers
25  // at each pixel, each pixel's integer designates the index of the region
26  // to which that pixel belongs; (2) 'ChannelVec' is a BYTE image sequence
27  // that has as many images as the # of regions in 'CombImg' and whose
28  // images are all the same size as 'CombImg'.
29  // POSTCOND: Fills up 'ChannelVec''s images with a single region per
30  // image, all regions taken from 'CombImg', such that the region's
31  // pixels are nonzero and everything else is zero.
32  void SeparateChannels(CImg<kjb_int32>& InCombImg, CImgVec<BYTE>& OutChannelVec,
33  const kjb_int32& nSegments);
34 
35 } // namespace DTLib {
36 
37 #endif /* #ifndef _CHANNELS_H */
void SeparateChannels(CImg< kjb_int32 > &InCombImg, CImgVec< BYTE > &OutChannelVec, const kjb_int32 &nSegments)
Definition: channels.cpp:20