Ask Your Question

user925's profile - activity

2017-03-12 04:41:27 -0500 received badge  Good Question (source)
2016-09-16 05:06:56 -0500 received badge  Nice Question (source)
2016-07-19 08:18:01 -0500 received badge  Famous Question (source)
2016-02-29 17:19:32 -0500 received badge  Student (source)
2016-02-26 02:49:40 -0500 received badge  Notable Question (source)
2015-11-18 08:25:58 -0500 received badge  Popular Question (source)
2014-07-23 09:24:46 -0500 commented answer how to insert a small size image on to a big image

hey, thanks a lot for replying and give the solution. It really worked!!!

2014-07-23 00:45:52 -0500 answered a question how to insert a small size image on to a big image

hey, thanks a lot for replying and give the solution. It really worked!!!

2014-07-23 00:42:32 -0500 received badge  Supporter (source)
2014-07-23 00:26:26 -0500 answered a question how to insert a small size image on to a big image

hey, thanks for giving this solution but the only problem I am facing is how to know what values should be given for small_image.cols and small_image.rows parameters.

2014-07-19 00:32:35 -0500 asked a question how to insert a small size image on to a big image

I have been successful in inserting text on to the big image but when it comes to inserting an image on to the big image, i am failing again and again. Here is my code of inserting text on to the big image:

int fr=1,i=1;
char name[20],s[20],smiley[20];
Mat image;
while(fr<=751)
{
sprintf(name,"images/img%u.jpg",i);

image = imread(name,CV_LOAD_IMAGE_COLOR);   // Read the file

if(! image.data )                              // Check for invalid input   
{
cout <<  "Could not open or find the image" << std::endl ;
return -1;
}
if((i>=1 && i<=100)||(i>=201 && i<=300) || (i>=401 && i<=500)||(i>=601&& i<=700))
{
putText(image, "HAPPY", cvPoint(80,80), 
FONT_HERSHEY_COMPLEX_SMALL, 1, cvScalar(800,800,950), 1, CV_AA);
}
if((i>=101 && i<=200)||(i>=301 && i<=400) || (i>=501 && i<=600)||(i>=701&& i<=800))
{
putText(image, "SAD", cvPoint(80,80), 
FONT_HERSHEY_COMPLEX_SMALL, 1, cvScalar(800,800,950), 1, CV_AA);    
}
sprintf(s,"pic/img%u.jpg",i);
imwrite(s,image);
fr++;
i++;
}
namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display.
imshow( "Display window", image );                   // Show our image inside it.

waitKey(0);                                          // Wait for a keystroke in the window           
return 0;

}

Please help in inserting an image on to the big image.