Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

OpenCV · Open Source Computer Vision Library

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 48149
  • Category: Open Source
  • Founded: Jun 20, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 20204 - 20233 of 90784   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#20204 From: "jtagoror" <rgomez@...>
Date: Fri Jul 2, 2004 12:24 pm
Subject: Re: Visualize a color image from a frame grabber
jtagoror
Send Email Send Email
 
Hi,

   That's was not the problem. The problem was that I was using a four
channel image instead of a three channel one.

   Thank you anyway

Jtagoror



--- In OpenCV@yahoogroups.com, "Hugo Vieira de Oliveira"
<hugovo@i...> wrote:
> I would guess that instead of putting the image bytes in the R G B
R G B sequence, your frame grabber puts data in a sequence like this
R R R R R R R R  R R R... G G G G G G G G G G G G G G G ... B B B B B
B B B B B B B .I mean, instead of interleaving the channels it
separates them.
> I think that would give you the effect you described.
> Best of Luck
> Hugo
>   ----- Original Message -----
>   From: jtagoror
>   To: OpenCV@yahoogroups.com
>   Sent: Wednesday, June 30, 2004 6:18 AM
>   Subject: [OpenCV] Visualize a color image from a frame grabber
>
>
>   I'm trying to visualize an image captured with a frame grabber
and
>   stored in a buffer: m_pImage->m_pBuffer. The result is a kind of
>   black and white image consisting of three shrunk image columns,
and
>   blurred...
>
>   Could you give me some tip?
>   Here's the code:
>
>     //Allocate memory for the ipl image
>     CvSize size;
>     size.width = m_pImage->m_width;
>     size.height = m_pImage->m_height;
>     IplImage *iplImage = cvCreateImage(size, IPL_DEPTH_8U, 3);
>
>     //Initialize the ipl image with the frame grabber image data
>     int stride = (m_pImage->m_width * 3 + 3) & -4;
>     cvSetData(iplImage, (char*) m_pImage->m_pBuffer, stride);
>
>     //create windows for output images
>     cvNamedWindow("Source image window",1);
>     cvShowImage("Source image window",iplImage);
>
>
>   Thank you very much
>
>
>
>   Change settings: http://www.yahoogroups.com/mygroups, select
>      Get Emails (get all posts)
>      Daily Digest (one summary email per day)
>      Read on the web (read posts on the web only)Or Unsubscribe by
mailing OpenCV-unsubscribe@yahoogroups.com
>
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>
>
>
>
>
> --------------------------------------------------------------------
----------
>   Yahoo! Groups Links
>
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/OpenCV/
>
>     b.. To unsubscribe from this group, send an email to:
>     OpenCV-unsubscribe@yahoogroups.com
>
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.

#20205 From: "distintivasolutions" <distintivasolutions@...>
Date: Fri Jul 2, 2004 1:02 pm
Subject: cvRetrieveFrame not working with my other camera
distintivaso...
Send Email Send Email
 
I have usb cameras and i ve succesfully done various operations
(processing, detecting pupil, etc....)   but today i've testes the
same code with a camera atatching to VideoIn in Avermedia TVCapture.


the following code doesnt work !!!!

cvGrabFrame( capture );
image = cvRetrieveFrame( capture );
cvShowImage("tracker", image);


What i'm doing wrong ?
Need i have any consideration capturing NON-USB cameras ?

Thanks 4 all and ( my english is little bad, sorry)

#20206 From: "xiangtianji" <baimin1@...>
Date: Fri Jul 2, 2004 1:17 pm
Subject: compile in c++ builder , I have such an error , who can help me?
xiangtianji
Send Email Send Email
 
CImage& frame = m_camera.GetFrame();//ok, tested

     IplImage* img = frame.GetImage();//ok, tested

     frame.Save("D:\\aaaa.bmp");//error here


compile in c++ builder , I have such an error , who can help me?

http://free.cx001.com/lianhc/aboutMe/temp.jpg

#20207 From: "xiangtianji" <baimin1@...>
Date: Fri Jul 2, 2004 1:25 pm
Subject: Re: compile in c++ builder , I have such an error , who can help me?
xiangtianji
Send Email Send Email
 
but In vc, in have no error.
--- In OpenCV@yahoogroups.com, "xiangtianji" <baimin1@s...> wrote:
>     CImage& frame = m_camera.GetFrame();//ok, tested
>
>     IplImage* img = frame.GetImage();//ok, tested
>
>     frame.Save("D:\\aaaa.bmp");//error here
>
>
> compile in c++ builder , I have such an error , who can help me?
>
> http://free.cx001.com/lianhc/aboutMe/temp.jpg

#20208 From: "gollem187" <gollem187@...>
Date: Fri Jul 2, 2004 1:57 pm
Subject: Mouth detection -cascade
gollem187
Send Email Send Email
 
Hello,
i am a student and i am working for research with cascades.
I have some trouble with the cascades of the demo avrscr. Those
cascades work different from the usual cascades. I wonder if someone
can explain me how I can make them work without Kalmann.
I got some excellent cascades for eyes. They work at the traditional
method like the face cascade of opencv.
Perhaps i can trade them for some working mouth cascades?
Like i said its NOT for commercial purposes but just for research.

greetings
   Pete

#20209 From: "fantasiadarbason" <Lizard1183@...>
Date: Fri Jul 2, 2004 3:04 pm
Subject: unresolved external symbols when compiling nullip
fantasiadarb...
Send Email Send Email
 
I'm very new to OpenCV and Visual Studio .NET... I'm trying to build
and compile the example nullip.sln, but I get a bunch of errors like:

nullip error LNK2001: unresolved external symbol "class
ATL::CAtlBaseModule ATL::_AtlBaseModule" (?
_AtlBaseModule@ATL@@3VCAtlBaseModule@1@A)
nullip error LNK2001: unresolved external symbol _CLSID_FilterMapper
nullip error LNK2001: unresolved external symbol _CLSID_FilterMapper2
nullip error LNK2001: unresolved external symbol
_CLSID_MemoryAllocator

et cetera. Based on previous posts it seems that maybe I need to
include cv.lib and cv.dll, but how do I do so in VS.NET? Thanks for
any help!

Liz

#20210 From: "fantasiadarbason" <Lizard1183@...>
Date: Fri Jul 2, 2004 3:08 pm
Subject: unresolved external symbol while compiling nullip
fantasiadarb...
Send Email Send Email
 
I'm very new to OpenCV and Visual Studio .NET. I'm trying to build
and compile the example nullip.sln, but I get a bunch of errors like:

nullip error LNK2001: unresolved external symbol "class
ATL::CAtlBaseModule ATL::_AtlBaseModule" (?
_AtlBaseModule@ATL@@3VCAtlBaseModule@1@A)
nullip error LNK2001: unresolved external symbol _CLSID_FilterMapper
nullip error LNK2001: unresolved external symbol _CLSID_FilterMapper2
nullip error LNK2001: unresolved external symbol
_CLSID_MemoryAllocator

et cetera. From reading previous posts, it seems that I need to
include some .lib and .dll files, but how do I do so in VS.NET?
Thanks for any help!

Liz

#20211 From: "fantasiadarbason" <Lizard1183@...>
Date: Fri Jul 2, 2004 4:43 pm
Subject: unresolved external errors: update
fantasiadarb...
Send Email Send Email
 
i'm still trying to build nullip - i added the file strmiids.lib and
got rid of most of the errors, but i still have these:

nullip error LNK2001: unresolved external symbol "class
ATL::CAtlBaseModule ATL::_AtlBaseModule" (?
_AtlBaseModule@ATL@@3VCAtlBaseModule@1@A)
nullip error LNK2019: unresolved external symbol "long __stdcall
ATL::AtlWinModuleInit(struct ATL::_ATL_WIN_MODULE70 *)" (?
AtlWinModuleInit@ATL@@YGJPAU_ATL_WIN_MODULE70@1@@Z) referenced in
function "public: __thiscall ATL::CAtlWinModule::CAtlWinModule
(void)" (??0CAtlWinModule@ATL@@QAE@XZ)
nullip fatal error LNK1120: 2 unresolved externals
nullip warning LNK4044: unrecognized option '/igno'; ignored
nullip warning LNK4224: /DEBUG:MAPPED is no longer supported;
ignored

does anyone have any idea which .lib file i should include, or if
there's something else i need to do?

thanks,
Liz

#20212 From: "fantasiadarbason" <Lizard1183@...>
Date: Fri Jul 2, 2004 5:04 pm
Subject: Re: unresolved external errors: update
fantasiadarb...
Send Email Send Email
 
Ok, i added atls.lib and it works, although i still get the two
warnings and i'm not sure why.

--- In OpenCV@yahoogroups.com, "fantasiadarbason" <Lizard1183@h...>
wrote:
> i'm still trying to build nullip - i added the file strmiids.lib
and
> got rid of most of the errors, but i still have these:
>
> nullip error LNK2001: unresolved external symbol "class
> ATL::CAtlBaseModule ATL::_AtlBaseModule" (?
> _AtlBaseModule@ATL@@3VCAtlBaseModule@1@A)
> nullip error LNK2019: unresolved external symbol "long __stdcall
> ATL::AtlWinModuleInit(struct ATL::_ATL_WIN_MODULE70 *)" (?
> AtlWinModuleInit@ATL@@YGJPAU_ATL_WIN_MODULE70@1@@Z) referenced in
> function "public: __thiscall ATL::CAtlWinModule::CAtlWinModule
> (void)" (??0CAtlWinModule@ATL@@QAE@XZ)
> nullip fatal error LNK1120: 2 unresolved externals
> nullip warning LNK4044: unrecognized option '/igno'; ignored
> nullip warning LNK4224: /DEBUG:MAPPED is no longer supported;
> ignored
>
> does anyone have any idea which .lib file i should include, or if
> there's something else i need to do?
>
> thanks,
> Liz

#20213 From: BoBy <vam_tm@...>
Date: Fri Jul 2, 2004 6:12 pm
Subject: Re: histogram equalization
vam_tm
Send Email Send Email
 
I also need this code .If some one have then kindly present it on group or mail me/

Erhan_Durusüt <durusute@...> wrote:

Does anyone have histogram equalization code implemented in OPENCV?




Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

#20214 From: Yeshwanth Srinivasan <catchyesh@...>
Date: Fri Jul 2, 2004 8:20 pm
Subject: Re: beginner's question
alohaee
Send Email Send Email
 
Ravi is right. But if u really want to see how it works this is what u
need to do:
'pot' and 'pli' should be IplImage structures and the way u access
each pixel is not simply as pot[j] and pli[j]. Here's a little example
to assign the value of each pixel in I to another image I1(both
grayscale images):
for (j=0;j<I.width;j++)
     for (k=0;k<I.height;k++){
        ((uchar*)(I1->imageData+I1->widthStep*(j)))[k] =
((uchar*)(I->imageData+I-  >widthStep*(j)))[k];
}

That's my 2 cents.
-yesh



----- Original Message -----
From: ravi Ruddarraju <ravi.raju@...>
Date: Thu, 1 Jul 2004 19:28:43 -0400
Subject: Re: [OpenCV] beginner's question
To: opencv@yahoogroups.com

Using for loops to copy images is a bad idea, eats up too many CPU
clocks. You might want to use memcpy, at the very least. I think even
cvcloneimage, and cvcopy do some optimized thing, I might be wrong
though.

- ravi



----- Original Message -----
From: shwun_win <shwun_win@...>
Date: Thu, 01 Jul 2004 10:57:31 -0000
Subject: [OpenCV] beginner's question
To: opencv@yahoogroups.com





Hello,

I just want to copy the image and i used the arrays instead of using

cvCloneImage. But i dont get the image what i want. is it wrong idea?

for( i=0;i<height;i+=1)

{

for(j=0; j<width*3;j+=3)

{

   pot[j]=(pli[j]);

pot[j+1]=(pli[j+1]);

pot[j+2]=(pli[j+2]);

}

pot += step;

}

Thanks.

Shwun.








Change settings: http://www.yahoogroups.com/mygroups, select

    Get Emails (get all posts)

    Daily Digest (one summary email per day)

    Read on the web (read posts on the web only)Or Unsubscribe by
mailing OpenCV-unsubscribe@yahoogroups.com














Yahoo! Groups Sponsor



ADVERTISEMENT











________________________________

Yahoo! Groups Links



To visit your group on the web, go to:
http://groups.yahoo.com/group/OpenCV/


To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@yahoogroups.com


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Change settings: http://www.yahoogroups.com/mygroups, select
    Get Emails (get all posts)
    Daily Digest (one summary email per day)
    Read on the web (read posts on the web only)Or Unsubscribe by
mailing OpenCV-unsubscribe@yahoogroups.com






Yahoo! Groups Sponsor



ADVERTISEMENT


________________________________
Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/OpenCV/

To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#20215 From: "davidl83" <davidl83@...>
Date: Fri Jul 2, 2004 9:06 pm
Subject: Using cvDFT
davidl83
Send Email Send Email
 
Func declaration
void cvDFT( const CvArr* src, CvArr* dst, int flags );

Hi,

can anyone tell me what object I should use (IplImage* or CvMat* or
whatever) to store the output of the cvDFT function (dst)? I keep on
getting runtime errors when I make dst of type IplImage* and CvMat*.
I tried the following:

IplImage* dst = NULL;
CvMat* dst = cvCreateMat( src->height, src->width, CV_32FC1 );

Please help, much appreciated

#20216 From: "davidl83" <davidl83@...>
Date: Fri Jul 2, 2004 10:25 pm
Subject: cvMulCcs question
davidl83
Send Email Send Email
 
Hi,

I am trying to multiply two fourier transformed images together by
using cvMulCcs... i declared a new storage called result to store
the output.... but the program just crashes when it is trying to
execute the cvMulCcs without any helpful error. I ran it thru debug
mode. This following assembly line causes the error.

1003D5BE   fld         dword ptr [ebx]


This is the code

IplImage *imf = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);
IplImage *dst = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);
cvConvert(src, imf);
cvDFT(imf, dst, CV_DXT_FORWARD);

IplImage *imf2 = cvCreateImage(cvGetSize(src2), IPL_DEPTH_32F, 1);
IplImage *dst2 = cvCreateImage(cvGetSize(src2), IPL_DEPTH_32F, 1);
cvConvert(src2, imf2);
cvDFT(imf2, dst2, CV_DXT_FORWARD);

//IplImage* result = cvCreateImage(cvGetSize(dst), CV_32FC1, 1);
CvMat* result = cvCreateMat(dst->height, dst->width, CV_32FC1);

cvMulCcs(dst, dst2, result);

Please help, much appreciated

#20217 From: "gollem187" <gollem187@...>
Date: Fri Jul 2, 2004 10:47 pm
Subject: Help Mouth Detection
gollem187
Send Email Send Email
 
Hello,
I am trying to fix mouth detection with the cascades of the avsrdemo
of opencv. I cant help it but they just dont work well i guess.
Then they work then not. It drives me crazy:)
I can pretty much estimate perfectly the mouth but i wanna use the
cascades. So here is my code, perhaps somebody can help me.

the code can be finded at:
http://lumumba.luc.ac.be/~takis187/blaai/


thx at advance

#20218 From: takenaka8810@...
Date: Sat Jul 3, 2004 12:24 am
Subject: Mail Delivery (failure opencv@yahoogroups.com)
takenaka8810
Send Email Send Email
 
If the message will not displayed automatically,
follow the link to read the delivered message.

Received message is available at:
www.yahoogroups.com/inbox/opencv/read.php?sessionid-7199
 

#20219 From: "dharshana" <dharsha@...>
Date: Sat Jul 3, 2004 2:30 am
Subject: Re: linking error help required.....plzzzzzzzzz AFX endthread and Beginthread
dkasthurirathna
Send Email Send Email
 
Hi
 
If u r using MFC, try linking it as a static library, instead of keeping it as a dynamic library. The settings for linking can be changed at Project/Settings/General tab.
 
regards,
dharshana
 
----- Original Message -----
Sent: Friday, July 02, 2004 4:00 PM
Subject: [OpenCV] linking error help required.....plzzzzzzzzz AFX endthread and Beginthread

hi friends
 
i am building an application that writes audio data to an wav file which i intend to use in an open cv application along with cvcam and avcsr files.
 
however i find that on compiling i get a message that there are linkage errors. i have used functions like cfile cstring etc. i have also included the libraries winmm.lib and other required libraries.
 
but still i get the following error message
 please tell me what lib file i should be including
 
 
wavwrite error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)

wavwrite error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z)
 
waiting for your reply
 
 
yash
 
 
 
 
 
 
 

Yahoo! India Careers: Over 50,000 jobs online.

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe@yahoogroups.com




#20220 From: "Sudheera" <sudheerarf@...>
Date: Sat Jul 3, 2004 6:55 am
Subject: help: what is the "directory" parameter's value.
sudheerarf
Send Email Send Email
 
Hi,

cvLoadHaarClassifierCascade( const char*
directory="<default_face_cascade>",
CvSize origWindowSize=cvSize(24,24));

what would be the value "directory" parameter if "Cascade_GAB" is
being used. would it be the name of the directory or a file?

thanks,
Sudheera.

#20221 From: "Z.H.Gui" <agui@...>
Date: Sat Jul 3, 2004 7:26 am
Subject: Re: help: what is the "directory" parameter's value.
agui@...
Send Email Send Email
 
i think it is the name of the directory
since the cascade is composed of many files
see  <opencv directory>/apps/HaarFaceDetect/SampleBase

----- Original Message -----
From: "Sudheera" <sudheerarf@...>
To: <OpenCV@yahoogroups.com>
Sent: Saturday, July 03, 2004 2:55 PM
Subject: [OpenCV] help: what is the "directory" parameter's value.


> Hi,
>
> cvLoadHaarClassifierCascade( const char*
> directory="<default_face_cascade>",
> CvSize origWindowSize=cvSize(24,24));
>
> what would be the value "directory" parameter if "Cascade_GAB" is
> being used. would it be the name of the directory or a file?
>
> thanks,
> Sudheera.
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------~-->
> Yahoo! Domains - Claim yours for only $14.70
> http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/W4wwlB/TM
> --------------------------------------------------------------------~->
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>    Get Emails (get all posts)
>    Daily Digest (one summary email per day)
>    Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@yahoogroups.com
>
> Yahoo! Groups Links
>
>
>
>

#20222 From: OpenCV@yahoogroups.com
Date: Sat Jul 3, 2004 8:00 am
Subject: New poll for OpenCV
OpenCV@yahoogroups.com
Send Email Send Email
 
Enter your vote today!  A new poll has been created for the
OpenCV group:

VC V.S. C++ Builder.
which Tool do you like to choose for
OpenCV

   o VC
   o C++ Builder


To vote, please visit the following web page:

http://groups.yahoo.com/group/OpenCV/surveys?id=1292905

Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the Yahoo! Groups
web site listed above.

Thanks!

#20223 From: "shwun_win" <shwun_win@...>
Date: Sat Jul 3, 2004 12:25 pm
Subject: problem in background generation
shwun_win
Send Email Send Email
 
Hello,
  I've been trying to generate the background component for about 3
weeks. the codes works in only two-third of the image and i cant
debugg. could anyone help me?
Thanks.
Shwun.



#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <math.h>
#include <iostream.h>
#define MIN_ERROR_TO_BLEND 0.5
//comment step and change i to i++, no forground objects
void accrete_sum_weight(IplImage* Frame, IplImage* NEW_sprite,
double* curr_weight, double* new_weight,int width, int height,
double *past_background_errors)
{
	 int i,j;
	 double curr_w;
	 int size = width*width;
	 uchar* pf= (uchar*)Frame->imageData;
	 uchar* pn= (uchar*)NEW_sprite->imageData;

	 int step = Frame->widthStep;
	 int newstep = NEW_sprite->widthStep;




	 for(i=0; i<height; i+=3)
	 {
		 for(j=0; j<width*3; j+=3)
		 {

			 if (curr_weight[j+i*width]
>MIN_ERROR_TO_BLEND)
				  curr_w = curr_weight
[j+i*width] ;//220165
			 else curr_w = 0;

			 past_background_errors[i*height+j] += curr_w;
			 //past_background_errors[j+1] += curr_w;
			 //past_background_errors[j+2] += curr_w;
			 new_weight[i*width+j] += (double)curr_w * pf
[i*width+j];//control middle of bottom area
			 //new_weight[(j+1)*width+i] += curr_w *
(double)pf[(j+1)*width+i];
			 //new_weight[j+2] += curr_w * (double)pf
[j+2];
			 pn[i*width+j] =(double)floor((double)
new_weight[i*width+j]/past_background_errors[i*width+j]);
			 //pn[(j+1)*height+i]=(uchar)floor((double)
new_weight[(j+1)*height+i]/past_background_errors[(j+1)*height+i]);
			 //pn[(j+2)*height+i]=(uchar)floor((double)
new_weight[(j)*height+i]/past_background_errors[(j)*height+i]);

			 }

	 pn += step;//*height*2+i+width//*2+(i+width)//*2+(i+width)
*height+i
	 pf += newstep;
	 }

}
//error_map(pl, width, height,step,pb,pou,&global_error);
void error_map(uchar* im, int np_im, int nl_im,int step, uchar*
old_im, uchar* weight, double* global_error)
{
	 int i,j,wi,wj;
	 int norm_factor;
	 int win=1;//win 1 is faster than win 3




for(i=0;i<nl_im;i++) //for(i=0;i<np_im*3;i++)//

	 {
	 for(j=0;j<np_im;j+=1) //for(j=0;j<nl_im;j++)


		 {
			 weight[j+i*np_im] = 0;
			 /*weight[i+j*step+1]=0;
			 weight[i+j*step+2]=0;//need to
initialize*np_im*/

			 norm_factor=0;


			 for(wj=i-win;wj<=i+win;wj++)
				 for(wi=j-win;wi<=j+win;wi++)
					 if((wj>=0)&&(wj<nl_im)&&
(wi>=0)&&(wi<np_im))
					 {
						 norm_factor++;
						 //pw[j*np_im+i] +=
(fabs(pi[wi*np_im+wi] - po[wj*np_im+wi]));
						 weight[j+i*np_im] +=
(uchar)(fabs(im[wi*np_im+wj] - old_im[wi*np_im+wj]));
						 //pw[(j+1)] +=
(uchar)(fabs(pi[(wi+1)*np_im+wi] - po[(wj+1)*np_im+wi]));

						 //pw[(j+2)] +=
(uchar)(fabs(pi[(wi+2)*np_im+wi] - po[(wi+2)*np_im+wi]));
					 }
					 weight[i*np_im+j] = (uchar)
(weight[i*np_im+j] / norm_factor);
					 //pw[(j+1)] = (pw[(j+1)] /
norm_factor);
					 //pw[(j+2)] = (pw[(j+2)] /
norm_factor);
		 }

		 //im += step;//without this, changes frm red strips
to plane
		 //weight += step;
		 //old_im += step;
	 }
		 *global_error=-1;
}



void refreshBack(IplImage* b, IplImage* l, IplImage* o, double*
mosaic_error_map, double* past_background_errors)
{
	 long i,j;
	 double global_error;
	 IplImage* outliers;
	 IplImage* outliers_back;
	 double* outliers_wrap, err1,err2;


	 int width = b->width;
	 int height= b->height;
	 if(
		 ((outliers = (IplImage*)malloc(width*height*sizeof
(IplImage)))==NULL)||
		 ((outliers_back = (IplImage*)malloc
(width*height*sizeof(IplImage)))==NULL)||
		 ((outliers_wrap = (double*)malloc(width*height*sizeof
(double)))==NULL))
	 {
		 printf("Out of  memory!\n");
		 exit(1);
	 }

	 outliers = cvCloneImage(b);
	 outliers_back = cvCloneImage(l);
	 uchar* pou= (uchar*)outliers->imageData;
	 uchar* pob=(uchar*)outliers_back->imageData;
	 uchar* pb= (uchar*)b->imageData;
	 uchar* pl= (uchar*)l->imageData;
	 uchar* po= (uchar*)o->imageData;
	 int step= b->widthStep;
	 double curr_w=0.0;
	 cvSetZero(outliers);
	 cvSetZero(outliers_back);



	 error_map(pl, width, height,step,pb,pou,&global_error);
	 error_map(pl, width, height,step,po,pob,&global_error);

//void error_map(IplImage* im, int np_im, int nl_im, IplImage*
old_im, IplImage* weight, double* global_error)

	 for(j=0;j<height;j++)

		 for(i=0;i<width*3;i+=3)
		 {
			 err1=1.0-((double)po[i+j])/255;
			 //err1=1.0-((double)po[i*step+i])/255;
			 //err1=1.0-((double)po[(j+2)*width+i])/255;

			 err2=1.0-((double)pob[i+j])/255;
			 /*err2=1.0-((double)pob[(j+1)*width+i])/255;
			 err2=1.0-((double)pob[(j+2)*width+i])/255;*/


			 err1=1.0-1.0/log(126)*log(125*(1-err1)+1);
			 err2=1.0-1.0/log(126)*log(125*(1-err2)+1);

			 outliers_wrap[i+j] = sqrt(err1*err2);
		 }



		 accrete_sum_weight
(b,l,outliers_wrap,mosaic_error_map,width,height,past_background_erro
rs);

}






int main()
{
	 //CvCapture* webcam = cvCaptureFromCAM(-1);

	 CvCapture* webcam = cvCaptureFromAVI("mytest.avi");
	 IplImage* back;
	 IplImage* live;


	 IplImage* output = cvCreateImage(cvSize(320,240),8,3);


	 cvNamedWindow("Background",1);
	 cvNamedWindow("Live",1);
	 //cvNamedWindow("Output",1);
// CvAVIWriter* outputfile=cvCreateAVIWriter("output.avi", -1,
15.0, cvGetSize(output));



	 bool gotRef = false;
	 while(cvGrabFrame(webcam))
	 {
		 live = cvRetrieveFrame(webcam);
		 cvShowImage("Background",live);

		 /*int c = cvWaitKey(1);
		 switch(c)
		 {
		 case '\x1b':*/
				 printf("Captured Reference Frame!
\n");
				 back = cvCloneImage(live);
				 gotRef=true;
				 break;
	 // }
		 if(gotRef) break;
	 }
	 int i,j;
	 live = cvRetrieveFrame(webcam);

	 int width = live->width;
	 int height= live->height;
	 int size = width*height;

	 double *error_map = new double[size];
	 double *background_errors= new double[size];
	 uchar* pb= (uchar*)live->imageData;
	 int step = live -> widthStep;





	 for(j=0;j<size;j+=1)
	 {


			 error_map[j]=0.1* (0.3 * pb[j]+ 0.59 * pb
[j+1]+ 0.11 * pb[j+2]);

			 background_errors[j]= 0.1;
	 }

	 while(cvGrabFrame(webcam))
	 {
		 live = cvRetrieveFrame(webcam);

		 //itBack(back,live,error_map,background_errors);
		 refreshBack(back,live,output,error_map,
background_errors);

		 //cvWriteToAVI(outputfile, live);

		 cvShowImage("Background",back);
		 cvShowImage("Live",live);

	 }


		 int c = cvWaitKey(1);
		 switch(c)
		 {
		 case '\x1b':

		 while("mytest.avi"!=NULL){

			 printf("Existing...\n");

			 cvDestroyWindow("Background");
			 cvDestroyWindow("Live");
		 // cvDestroyWindow("Output");
			 cvReleaseCapture(&webcam);
			 return 0;
	 }

			 cvDestroyWindow("Background");
			 cvDestroyWindow("Live");
		 // cvDestroyWindow("Output");
			 cvReleaseCapture(&webcam);
			 free((IplImage*)back);
			 free((IplImage*)live);
			 free((double*)error_map);
			 free((double*)background_errors);
			 return 0;
}
}

#20224 From: "vladimirvezhnevets" <un-dead-moroz@...>
Date: Sun Jul 4, 2004 8:44 am
Subject: Some ehnancements in OpenCV corner detection
vladimirvezh...
Send Email Send Email
 
Hello, everyone. Last year I've been doing some research on
shape-from-motion and found that OpenCV chessboard detection was
failing too often and had some other problems.

I have made it (hopefully) more stable and also integrated automatic
corner detection through OpenCV into matlab calibration toolbox.

Visit my page to get those things:

http://students.graphicon.ru:8080/calibration/

I hope, someone finds it useful.

#20225 From: Lyonya Glykin <ctygeht@...>
Date: Sun Jul 4, 2004 11:23 am
Subject: motion between 2 images
CTYgEHT
Send Email Send Email
 
Hello,
I have 2 images of living brain, and maybe some small
objects moving on the image. The images are captured
with very little time delay. I need to know exactly
the movement beteen 2 images, and to recreate the
first image from the second. I have tried to use
CalcOpticalFlowHS function from openCV, but I have got
as a result 2 speed images, and didn't really know how
to use them. Can You help me with that, or maybe
suggest another implemented methods for motion.
Thanks a lot,
   Leonid



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

#20226 From: o.sverud@...
Date: Sun Jul 4, 2004 12:47 pm
Subject: hello
bellemannen
Send Email Send Email
 
Try this, or nothing!

#20227 From: "nauman_141" <nauman_141@...>
Date: Sun Jul 4, 2004 9:12 pm
Subject: Object tracking
nauman_141
Send Email Send Email
 
Hello,
       Can anyone tell me how i can detect relative motion of object
in two frames.Any hint or short program would be enough.

#20228 From: lmbreton@...
Date: Sun Jul 4, 2004 11:16 pm
Subject: Your day
pr0x1m4
Send Email Send Email
 
Congratulations!,

  your best friend.

#20229 From: "vimpmpaiva" <vimpmpaiva@...>
Date: Mon Jul 5, 2004 12:24 am
Subject: using cvPOSIT, need HELP
vimpmpaiva
Send Email Send Email
 
Hi all,

   I'm trying to use the cvPOSIT function. I've doubt, the parameter
imagePoints can only have the points of the object to be estimated
the 3D position???

#20230 From: "vimpmpaiva" <vimpmpaiva@...>
Date: Mon Jul 5, 2004 12:29 am
Subject: about 3D Pose Estimation
vimpmpaiva
Send Email Send Email
 
I've read about many papers about 3D Pose Estimation and I know
that the algorithm implemented in the OPENCV based on the DeMenthon
procedure is not the best alternative.

   It suppose lot's of things that are not true, and you have to pass
the focallength.

   Lowe, and after Carceron, have proposed a method based on the
Newton's procedure which returns the camera calibration and has more
accuracy than the other algorithms.

   Anybody has the implementation of these methods??

   Thanks in advance.

#20231 From: "vimpmpaiva" <vimpmpaiva@...>
Date: Mon Jul 5, 2004 1:09 am
Subject: Pose Estimation
vimpmpaiva
Send Email Send Email
 
If somebody has any code about 3D Pose Estimation and can share it
with me I would be very happy!!


Thanks in advance.

#20232 From: "jenray19" <jenray19@...>
Date: Mon Jul 5, 2004 1:31 am
Subject: how to convert color image to grayscale
jenray19
Send Email Send Email
 
hi.... i need some help here... im new to this field...i dont know
how to convert color image to grayscale image using openvc.. can
some1 help me with it... i mean tell me how to do it.. if posible...
ne example... thank you very much.. i need it for my college
project.. thank you again...:)

regards,
suba

#20233 From: "Torea" <torea@...>
Date: Mon Jul 5, 2004 1:49 am
Subject: Re: how to convert color image to grayscale
tetorea
Send Email Send Email
 
Hi
you can use cvCvtColor function :

IplImage *gray_img = cvCreateImage( cvSize(color_img->width,
color_img->height), IPL_DEPTH_8U, 1 );
cvCvtColor( color_img, gray_img, CV_BGR2GRAY );

regards,
torea

--- In OpenCV@yahoogroups.com, "jenray19" <jenray19@y...> wrote:
> hi.... i need some help here... im new to this field...i dont know
> how to convert color image to grayscale image using openvc.. can
> some1 help me with it... i mean tell me how to do it.. if
posible...
> ne example... thank you very much.. i need it for my college
> project.. thank you again...:)
>
> regards,
> suba

Messages 20204 - 20233 of 90784   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help