Selecting an area from displayed image using CImg library

Posted by sravan on Stack Overflow See other posts from Stack Overflow or by sravan
Published on 2010-01-30T09:01:36Z Indexed on 2010/05/08 14:08 UTC
Read the original article Hit count: 272

Filed under:
|
|

hi all,

i use CImg for my image processing work. I had written a small piece of code which is follows:

#include "../CImg.h"
#include <iostream> 
using namespace std;
using namespace cimg_library;

int main(int argc,char**argv)
{
 CImg<int> img(argv[1]);
 CImgDisplay disp;
 disp.assign(img);
 while(!disp.is_closed)
    disp.wait();
 return 0;  
}

Now i want to select an area from the displayed image. Can some one tell me how to select an area from displayed image and store the selected pixels, and display the selected region in different display window. If some one can provide code, it will be of great help to me.

Thank you all

© Stack Overflow or respective owner

Related posts about cimg

Related posts about c++