35 #include "io_png/io_png.h"
41 typedef std::vector<unsigned char>::iterator usIt;
42 typedef std::vector<int>::iterator iIt;
43 typedef std::vector<short>::iterator sIt;
44 typedef std::vector<float>::iterator fIt;
45 typedef std::vector<double>::iterator dIt;
47 typedef std::vector<unsigned char>::const_iterator uscIt;
48 typedef std::vector<int>::const_iterator icIt;
49 typedef std::vector<short>::const_iterator scIt;
50 typedef std::vector<float>::const_iterator fcIt;
51 typedef std::vector<double>::const_iterator dcIt;
66 std::vector <T> image_ ;
71 std::vector <int> roi_ ;
75 std::vector <float> origin_ ;
76 std::vector <float> pixel_size_ ;
82 image(
const int width,
const int height);
83 image(
const T *vector,
const int width,
const int height,
const int channels);
84 image(
const int width,
const int height,
const int nChannels,
const T &a);
85 image(
const int width,
const int height,
const T &a,
const T &b,
const T &c);
86 image(
const int width,
const int height,
const int nChannels);
87 image(std::string name );
95 inline std::vector <T> *get_image(){
return &image_;}
96 inline int width()
const {
return width_;}
97 inline int height()
const {
return height_;}
98 inline int nChannels()
const {
return nChannels_;}
99 inline int size()
const {
return image_.size();}
101 inline T&
operator()(
const int &x,
const int &y,
const int &channel);
102 inline const T&
operator[](
const int &i)
const;
105 int write(std::string name);
107 int read(std::string name);
110 void init(
const int width,
const int height,
const int nChannels);
112 void set_size(
int width,
int height);
115 image<T> const resize_no_omp(
const int width,
const int height)
const ;
120 std::vector <int> get_roi()
const{
return roi_;}
121 void roi_clear(){roi_.clear();}
122 void set_roi(
const int x0,
const int x1,
const int y0,
const int y1);
123 void set_roi(
const int x0,
const int x1,
const int y0,
const int y1,
124 const int c0,
const int c1);
125 void set_roi(
const std::vector<int> roi);
126 template <
class U>
void get_roi_image(
image<U> &image2)
const;
127 image<T> const get_roi_image(
const std::vector <int> &roi2)
const;
128 template <
class U>
void set_roi_image(
const image<U> &image2);
131 typedef typename std::vector <T>::iterator iterator;
132 inline iterator begin() {
return(image_.begin());}
133 inline iterator end() {
return(image_.end());}
146 template<
class U>
void get_histogram(std::vector<U> &histograma,
int channel);
162 int width_s=width_/2;
163 int height_s=height_/2;
164 sampled_img=
image<T>(width_s,height_s,nChannels_);
166 for(
int n=0;n<nChannels_;n++){
167 int n0=n*width_*height_;
168 int n_s=n*width_s*height_s;
169 int i_end=height_s-1;
171 #pragma omp parallel for shared(i_end,n0,n_s,sampled_img,width_s)
173 for(
int i=1;i<i_end;i++){
174 int m0=n0+2*i*width_;
175 int m_s=n_s+i*width_s;
177 for(
int j=1;j<j_end;j++){
179 sampled_img[m_s+j]=0.25*image_[m]+0.125*(image_[m+1]+image_[m-1]+
182 0.0625*(image_[m+width_+1]+
191 for(
int n=0;n<nChannels_;n++){
192 int n0=n*width_*height_;
193 int n_s=n*width_s*height_s;
194 for(
int i=0;i<height_s;i++){
197 int m_s=n_s+i*width_s;
198 for(
int j=0;j<width_s;j+=width_s-1){
201 int mN=m,mS=m,mW=m,mE=m,mNE=m,mNW=m,mSE=m,mSW=m;
202 if(i0>0){ mS-=width_; mSE-=width_; mSW=m-width_; }
203 if(i0<(height_-1)){ mN+=width_; mNE+=width_; mNW+=width_; }
204 if(j0>0) {mW-=1; mNW-=1; mSW-=1;}
205 if(j0<(width_-1)){ mE+=1; mNE+=1; mSE+=1;}
207 sampled_img[m_s+j]=0.25*image_[m]+0.125*(image_[mN]+image_[mS]+
208 image_[mW]+image_[mE])+
209 0.0625*(image_[mNW]+image_[mNE]+
210 image_[mSW]+image_[mSE]);
216 for(
int n=0;n<nChannels_;n++){
217 int n0=n*width_*height_;
218 int n_s=n*width_s*height_s;
219 for(
int i=0;i<height_s;i+=height_s-1){
222 int m_s=n_s+i*width_s;
223 for(
int j=1,j_end=width_s-1;j<j_end;j++){
226 int mN=m,mS=m,mW=m,mE=m,mNE=m,mNW=m,mSE=m,mSW=m;
227 if(i0>0){ mS-=width_; mSE-=width_; mSW=m-width_; }
228 if(i0<(height_-1)){ mN+=width_; mNE+=width_; mNW+=width_; }
229 if(j0>0) {mW-=1; mNW-=1; mSW-=1;}
230 if(j0<(width_-1)){ mE+=1; mNE+=1; mSE+=1;}
232 sampled_img[m_s+j]=0.25*image_[m]+0.125*(image_[mN]+image_[mS]+
233 image_[mW]+image_[mE])+
234 0.0625*(image_[mNW]+image_[mNE]+
235 image_[mSW]+image_[mSE]);
249 template <
class T>
template <
class U>
254 if (nChannels_<channel)
258 int size=width_*height_;
259 histograma.resize(256);
261 #pragma omp parallel for
263 for(
int i=0;i<256;i++) histograma[i]=0;
265 int i_end=size*channel;
267 for(
int i=size*(channel-1);i<i_end;i++)
268 histograma[image_[i]]++;
283 nChannels_=nChannels;
284 int size=width_*height_*nChannels_;
298 if (x<=width_*height_*nChannels_)
312 if (x<=width_*height_*nChannels_)
333 int size=width_*height_*nChannels_;
337 #pragma omp parallel \
340 for(
int n=0;n<nChannels();n++){
343 #pragma omp for nowait
345 for(
int i=0;i<size;i++)
347 image_[i+n2_]=vector[i+n2_];
364 width_=img_in.width() ;
365 height_=img_in.height();
366 nChannels_=img_in.nChannels();
367 int size=width_*height_*nChannels_;
371 #pragma omp parallel \
374 for(
int n=0;n<img_in.nChannels();n++){
377 #pragma omp for nowait
379 for(
int i=0;i<size;i++)
381 image_[i+n2_]=img_in[i+n2_];
385 if(img_in.get_roi().size() == 6){
387 roi_.at(0)=img_in.get_roi().at(0);
388 roi_.at(1)=img_in.get_roi().at(1);
389 roi_.at(2)=img_in.get_roi().at(2);
390 roi_.at(3)=img_in.get_roi().at(3);
391 roi_.at(4)=img_in.get_roi().at(4);
392 roi_.at(5)=img_in.get_roi().at(5);
403 template <
class T>
template<
class U>
406 if (nChannels_!=3)
return;
407 int size=width_*height_;
408 for (
int i=0; i<size;i++)
411 U value= image_[i+size];
412 U saturation= image_[i+2*size];
413 U red=0,blue=0,green=0;
417 image[i+size*2]=value-saturation*value/255;
418 blue=image[i+size]=hue*(red-blue)/43+blue;
420 if(hue>43 && hue<=85){
421 green=image[i+size]=value;
422 blue=image[i+size*2]=value-saturation*value/255;
423 image[i]=-((hue-85)*(green-blue)/43-blue);
425 if(hue>85 && hue<=128){
426 red=image[i+size]=value;
427 green=image[i]=value-saturation*value/255;
428 image[i+size*2]=(hue-85)*(green-red)/43+red;
430 if(hue>128 && hue<=171){
431 blue=image[i+2*size]=value;
432 red=image[i]=value-saturation*value/255;
433 image[i+size]=((hue-171)*(blue-red)/43+red);
435 if(hue>171 && hue<=214){
436 blue=image[i+2*size]=value;
437 green=image[i+size]=value-saturation*value/255;
438 image[i]=-(hue-171)*(blue-green)/43+green;
442 green=image[i+size]=value-saturation*value/255;
443 image[i+2*size]=((hue-214)*(red-green)/43+green);
460 if (nChannels_!=3)
return;
461 if (H.width()!=width_ || S.width()!=width_ || V.width()!=width_)
return;
463 int size_=width_*height_;
464 for (
int i=0; i<size_;i++)
466 unsigned char red, green, blue;
467 red= (
unsigned char) image_[i];
468 green=(
unsigned char) image_[i+size_];
469 blue=(
unsigned char) image_[i+2*size_];
470 unsigned char rgb_min,rgb_max;
472 if(rgb_min>green) rgb_min=green;
473 if(rgb_min>blue) rgb_min=blue;
474 if(rgb_max<green) rgb_max=green;
475 if(rgb_max<blue) rgb_max=blue;
482 V[i]=(
unsigned char) rgb_max;
483 S[i]=(
unsigned char) ((
int) 255*(rgb_max - rgb_min)/rgb_max);
490 H[i]=(
unsigned char) ((
int) 0+43*((int) green - blue)/
491 (rgb_max - rgb_min));
493 else if (rgb_max == green) {
494 H[i]= (
unsigned char) ((
int) 85+ 43*((int) blue-red)/(rgb_max - rgb_min));
497 H[i]= (
unsigned char) ((
int) 171 + 43*((int) red - green)/
498 (rgb_max - rgb_min));
513 if(x0>x1 || y0>y1 || x0>width_ || y0>height_)
return;
517 roi_.at(1)=x1>width_?width_:x1;
519 roi_.at(3)=y1>height_?height_:y1;
521 roi_.at(5)=nChannels_;
534 const int y1,
const int c0,
const int c1)
536 if(x0>x1 || y0>y1 || x0>width_ || y0>height_ || c0>nChannels_ || c0>c1 )
541 roi_.at(1)=x1>width_?width_:x1;
543 roi_.at(3)=y1>height_?height_:y1;
566 template <
class T>
template <
class U>
void image<T>::
570 if(roi_.size()<6)
return;
578 if( x1<=width_ && y1<=height_ && x0<=x1 && y0<=y1 && c1<=nChannels_ &&
582 int size=width*height;
584 if(image2.width()!=width || image2.height()!=height ||
585 image2.nChannels()!=nChannels_)
return;
587 int i,j,n,i2,i2_,n2,n2_,size_=width_*height_;
590 #pragma omp parallel \
591 shared(x0,x1,y0,y1,c0,c1,width,size,size_) \
592 private(n,i,j,n2,n2_,i2,i2_)
598 #pragma omp for nowait
602 i2=n2+(i-y0)*width-x0;
604 image_[i2_+j]=(T) image2[i2+j] ;
620 image<T>
const image<T>::get_roi_image(
const std::vector <int> &roi2)
const
622 int x0,x1,y0,y1,c0,c1;
638 if( x1<= width_ && y1<= height_ && x0<x1 && y0<y1 && c1<= nChannels_ &&
647 image<T> image2(width,height,c1-c0);
649 int size_=width_*height_;
650 int size=width*height;
651 int i,n,j,i2,i2_,n2,n2_;
654 #pragma omp parallel \
655 shared(image2,x0,x1,y0,y1,c0,c1,width,size,size_) \
656 private(n,i,j,n2,n2_,i2,i2_)
662 #pragma omp for nowait
666 i2=n2+(i-y0)*width-x0;
668 image2[i2+j]= image_[i2_+j] ;
683 template <
class T>
template <
class U>
void image<T>::
684 get_roi_image(image<U> &image2)
const
686 int x0,x1,y0,y1,c0,c1;
706 if( x1<= width_ && y1<= height_ && x0<=x1 && y0<=y1 && c1<= nChannels_ &&
712 if(image2.width()!=width || image2.height()!=height ||
713 image2.nChannels()!=nChannels_){
714 image2=image<U>(width,height,c1-c0);
717 int size_=width_*height_;
718 int size=width*height;
719 int i,n,j,i2,i2_,n2,n2_;
722 #pragma omp parallel \
723 shared(x0,x1,y0,y1,c0,c1,width,size,size_) \
724 private(n,i,j,n2,n2_,i2,i2_)
730 #pragma omp for nowait
734 i2=n2+(i-y0)*width-x0;
736 image2[i2+j]=(U) image_[i2_+j] ;
753 if( width_==image2.width() && height_==image2.height() &&
754 nChannels_==3 && image2.nChannels()==1){
755 if(image_.size()!=(
unsigned int) (3*width_*height_) ) image_.
resize(3*width_*height_);
756 int size_=width_*height_;
758 for(
int m=0;m<size_;m++){
759 image_[m] = image2[m];
760 image_[m+size_] = image2[m];
761 image_[m+size_2] = image2[m];
767 if( width_!=image2.width() || height_!=image2.height() ||
768 nChannels_!=image2.nChannels()){
769 width_=image2.width();
770 height_=image2.height();
771 nChannels_=image2.nChannels();
772 image_.resize(image2.size());
775 int k,k_end=image2.size();
777 #pragma omp parallel for shared(k_end) private(k)
780 image_[k]= image2[k];
795 image<T> image2(width_,height_,nChannels_,255);
797 int width_1=width_-1;
798 int height_1=height_-1;
799 for(
int n=0;n<nChannels_;n++){
800 int n0=n*width_*height_;
802 #pragma omp parallel for shared(H,image2,n,n0,width_1,height_1)
804 for(
int i=0;i<height_;i++){
805 for(
int j=0;j<width_;j++){
807 double z0=H[2][0]*j+H[2][1]*i+H[2][2];
808 double x0=H[0][0]*j+H[0][1]*i+H[0][2];
809 double y0=H[1][0]*j+H[1][1]*i+H[1][2];
812 if(x0<0 || x0>=width_ || y0<0 || y0>=height_)
continue;
816 int m0=n0+y0i*width_;
824 dy0_1*dx0_1*image_[m0+x0i]+
825 dy0*dx0_1*image_[m0+width_+x0i]+
826 dy0*dx0*image_[m0+width_+x0i+1]+
827 dy0_1*dx0*image_[m0+x0i+1]
832 dy0_1*dx0_1*image_[m0+x0i]+
833 dy0*dx0_1*image_[m0+x0i]+
834 dy0*dx0*image_[m0+x0i+1]+
835 dy0_1*dx0*image_[m0+x0i+1]
842 dy0_1*dx0_1*image_[m0+x0i]+
843 dy0*dx0_1*image_[m0+width_+x0i]+
844 dy0*dx0*image_[m0+width_+x0i]+
845 dy0_1*dx0*image_[m0+x0i]
850 dy0_1*dx0_1*image_[m0+x0i]+
851 dy0*dx0_1*image_[m0+x0i]+
852 dy0*dx0*image_[m0+x0i]+
853 dy0_1*dx0*image_[m0+x0i]
873 const int height )
const
875 printf(
"width=%d width_=%d height=%d height_=%d \n",width,width_,height,
878 if(width==width_ && height==height_)
return (*
this);
880 if(width<=width_/2 && height<=height_/2){
881 return(((*this).sampling()).resize(width,height));
884 if(height<100)
return(resize_no_omp(width,height));
886 if(width==0 || height==0)
return(
image<T> ());
888 image<T> image2(width,height,nChannels_);
892 if( width_>width && width_%width==0 && height_>height && height_%height==0 ){
893 int scale_x=width_/width;
894 int scale_y=height_/height;
895 for(
int n=0;n<nChannels_;n++){
896 int n0=n*width_*height_;
897 int n2=n*width*height;
899 #pragma omp parallel for shared(image2,n,n0,n2,scale_x,scale_y)
901 for(
int i=0;i<height;i++){
902 int m0=n0+scale_y*i*width_;
904 for(
int j=0;j<width;j++){
905 image2[m2+j]=image_[m0+scale_x*j];
913 double scale_x=(double) width_/width;
914 double scale_y=(double) height_/height;
916 int width_1=width_-1;
917 int height_1=height_-1;
918 for(
int n=0;n<nChannels_;n++){
919 int n0=n*width_*height_;
920 int n2=n*width*height;
922 #pragma omp parallel for shared(image2,n,n0,n2,scale_x,scale_y,width_1,\
925 for(
int i=0;i<height;i++){
930 int m0=n0+y0i*width_;
932 for(
int j=0;j<width;j++){
940 dy0_1*dx0_1*image_[m0+x0i]+
941 dy0*dx0_1*image_[m0+width_+x0i]+
942 dy0*dx0*image_[m0+width_+x0i+1]+
943 dy0_1*dx0*image_[m0+x0i+1]
948 dy0_1*dx0_1*image_[m0+x0i]+
949 dy0*dx0_1*image_[m0+x0i]+
950 dy0*dx0*image_[m0+x0i+1]+
951 dy0_1*dx0*image_[m0+x0i+1]
958 dy0_1*dx0_1*image_[m0+x0i]+
959 dy0*dx0_1*image_[m0+width_+x0i]+
960 dy0*dx0*image_[m0+width_+x0i]+
961 dy0_1*dx0*image_[m0+x0i]
966 dy0_1*dx0_1*image_[m0+x0i]+
967 dy0*dx0_1*image_[m0+x0i]+
968 dy0*dx0*image_[m0+x0i]+
969 dy0_1*dx0*image_[m0+x0i]
991 if(width==0 || height==0)
return(
image<T> ());
993 if(width==width_ && height==height_)
return (*
this);
995 if(width<=width_/2 && height<=height_/2)
996 return(((*this).sampling()).resize_no_omp(width,height));
998 image<T> image2(width,height,nChannels_);
1002 if( width_>width && width_%width==0 && height_>height && height_%height==0 ){
1003 int scale_x=width_/width;
1004 int scale_y=height_/height;
1005 for(
int n=0;n<nChannels_;n++){
1006 int n0=n*width_*height_;
1007 int n2=n*width*height;
1008 for(
int i=0;i<height;i++){
1009 int m0=n0+scale_y*i*width_;
1011 for(
int j=0;j<width;j++){
1012 image2[m2+j]=image_[m0+scale_x*j];
1020 double scale_x=(double) width_/width;
1021 double scale_y=(double) height_/height;
1023 int width_1=width_-1;
1024 int height_1=height_-1;
1025 for(
int n=0;n<nChannels_;n++){
1026 int n0=n*width_*height_;
1027 int n2=n*width*height;
1028 for(
int i=0;i<height;i++){
1029 double y0=scale_y*i;
1033 if(y0i>=height_) y0i=height_-1;
1034 int m0=n0+y0i*width_;
1036 for(
int j=0;j<width;j++){
1037 double x0=scale_x*j;
1044 dy0_1*dx0_1*image_[m0+x0i]+
1045 dy0*dx0_1*image_[m0+width_+x0i]+
1046 dy0*dx0*image_[m0+width_+x0i+1]+
1047 dy0_1*dx0*image_[m0+x0i+1]
1052 dy0_1*dx0_1*image_[m0+x0i]+
1053 dy0*dx0_1*image_[m0+x0i]+
1054 dy0*dx0*image_[m0+x0i+1]+
1055 dy0_1*dx0*image_[m0+x0i+1]
1062 dy0_1*dx0_1*image_[m0+x0i]+
1063 dy0*dx0_1*image_[m0+width_+x0i]+
1064 dy0*dx0*image_[m0+width_+x0i]+
1065 dy0_1*dx0*image_[m0+x0i]
1070 dy0_1*dx0_1*image_[m0+x0i]+
1071 dy0*dx0_1*image_[m0+x0i]+
1072 dy0*dx0*image_[m0+x0i]+
1073 dy0_1*dx0*image_[m0+x0i]
1093 int size=width_*height_;
1095 #pragma omp parallel for shared(size,aux)
1097 for (
int i=0; i<size;i++)
1102 return aux.
write(name);
1115 int pos=name.find_last_of(
'.');
1116 int size_ = width_*height_;
1117 unsigned char *red =
new unsigned char[size_],
1118 *green =
new unsigned char[size_],
1119 *blue =
new unsigned char[size_];
1121 if(pos == (
int)std::string::npos)
return -1;
1123 for(
int i=0; i<size_; i++)
1126 green[i] = image_[i+size_];
1127 blue[i] = image_[i+size_*2];
1130 std::string extension=name.substr(pos+1);
1131 if( (extension == std::string(
"png")) || (extension == std::string(
"PNG")))
1133 int output_value = ami_write_png(strdup(name.c_str()),red,green,blue,width_,
1138 return output_value;
1143 printf(
"WRITE::Unrecognized image format\n");
1157 if((x+y*width_+channel*width_*height_)>=(image_.size())){
1158 printf(
"image<T>: bounds error vector access\n");
1159 printf(
"image size()=%d index to accces the vector =%d\n",
1160 image_.size(),x+y*width_+
1161 channel*width_*height_);
1162 int j; scanf(
"%d",&j);
1166 return image_[x+y*width_+channel*width_*height_];
1179 if(i>=(
int)(image_.size())){
1180 printf(
"image<T>: bounds error vector access\n");
1181 printf(
"image size()=%d index to accces the vector =%d\n",
1182 (
int)image_.size(),i);
1183 int j; scanf(
"%d",&j);
1200 if(i>=(
int)(image_.size())){
1201 printf(
"image<T>: bounds error vector access\n");
1202 printf(
"image size()=%d index to accces the vector =%d\n",
1203 (
int)image_.size(),i);
1204 int j; scanf(
"%d",&j);
1208 return (image_.at(i));
1223 image_.resize(width*height);
1241 int size=width_*height_;
1242 image_.resize(size*3);
1245 #pragma omp parallel for shared(size) private(i)
1250 #pragma omp parallel for shared(size) private(i)
1252 for(i=size;i<2*size;i++)
1255 #pragma omp parallel for shared(size) private(i)
1257 for(i=2*size;i<3*size;i++)
1273 nChannels_=nChannels;
1274 int size=width_*height_*nChannels_;
1275 image_.resize(size);
1278 #pragma omp parallel for shared(size) private(i)
1280 for(i=0;i<size;i++) image_.at(i)=a;
1295 nChannels_=nChannels;
1296 int size=width_*height_*nChannels_;
1297 image_.resize(size);
1357 nChannels_=nchannel1;
1358 image_.resize(nChannels_*width_*height_);
1373 image_.resize(nChannels_*width_*height_);
1387 for(
int k=0; k<nChannels_;k++){
1389 for(
int i=0; i< height_;i++){
1391 for(
int j=0; j<(width_/2);j++){
1392 T aux = image_[(k*height_*width_)+i*width_+j];
1394 image_[(k*height_*width_)+i*width_+j] = image_[(k*height_*width_)+
1395 i*width_+width_-j-1];
1396 image_[(k*height_*width_)+i*width_+width_-j-1] = aux;
1413 unsigned char *red, *green, *blue;
1416 int output_value = ami_read_png(strdup(name.c_str()),&red,&green,&blue,
1420 return output_value;
1426 int size_ = width_ * height_;
1427 image_.resize(size_*nChannels_);
1429 for(
int i=0; i<size_; i++)
1431 image_[i] = (T)red[i];
1432 image_[i+size_] = (T)green[i];
1433 image_[i+size_*2] = (T)blue[i];
image< T > const linear_transform(const double H[3][3]) const
function to apply a linear transform given by an homography H to the image. H goes to the output imag...
Definition: image.h:793
void imageMirrored()
mirrored the image
Definition: image.h:1383
int read(std::string name)
Read an image selecting the library depend on the image format, returns 0 when it can't load the imag...
Definition: image.h:1411
image< T > const resize(const int width, const int height) const
Definition: image.h:871
void clear()
Function to put the image to 0 and clear its vectors.
Definition: image.h:1338
image()
basic destructor
Definition: image.h:1307
void init(const int width, const int height, const int nChannels)
initializes the image taking memory
Definition: image.h:279
image< T > const sampling() const
method to downsample the image by a factor of 2. We filter the image before downsampling ...
Definition: image.h:158
int write(std::string name)
Function to write an image to disk.
Definition: image.h:1113
void get_histogram(std::vector< U > &histograma, int channel)
Definition: image.h:250
void rgb_to_hsv(image< unsigned char > &H, image< unsigned char > &S, image< unsigned char > &V)
function to get colour model HSV from RGB (unsigned char version)
Definition: image.h:457
void set_value(const int x, T value)
set value to x position of vector
Definition: image.h:296
T & operator[](const int &i)
operator [] to acces image value
Definition: image.h:1197
void set_roi(const int x0, const int x1, const int y0, const int y1)
function to set a subwindow border
Definition: image.h:511
~image()
basic constructor
Definition: image.h:1316
void set_size(int width, int height)
Change the image dimensions.
Definition: image.h:1369
int write_bool(std::string name)
function to write to disk a 8/16 bit tif image from boolean image
Definition: image.h:1090
T & operator()(const int &x, const int &y, const int &channel)
operator () to acces image value
Definition: image.h:1155
void set_nchannels(int nchannel1)
Change number of channels.
Definition: image.h:1355
image & operator=(const image &image2)
operator = (equality of images of different size is not allowed )
Definition: image.h:751
T get_value(const int x)
get value to x position of vector
Definition: image.h:309
Class to store multiChannel images and basic methods.
Definition: image.h:65