Home > Software engineering >  How to speed up the process how to use appropriate thread
How to speed up the process how to use appropriate thread

Time:11-25

My function is to realize the scan qr code and identify
Pseudo code
 while (b_scanning) 
{
Cap & gt;> Frame;
CvtColor (frame, imageGray CV_RGB2GRAY);//this is conversion
Ret=QRCode: : GetQR (imageGray);//this is recognition of qr code
if (! Ret. Empty ())
{
B_scanning=FALSE;
}
Imshow (" view ", frame);//this is
WaitKey (30);
}


Which identify the qr code function particularly time-consuming, this operation can I make imshow BuKa
Is a function of the recognition of qr code on the thread, how to create a thread
Please describe the thread running the line



.

CodePudding user response:

A little bit more simple of the advance imshow to identify before
Before I tried zxing , the speed is very fast, can have a try, the new version of the don't provide the CPP, can use previous versions to see

CodePudding user response:

reference 1st floor zgl7903 response:
a little bit more simple can advance the imshow to identify before
Before I tried zxing , the speed is very fast, can have a try, the new version of the don't provide the CPP, can use previous versions to see

I am the time-consuming operations in a thread, each loop over will create a thread; In my notebook is very smooth, but in low with not on the computer, and does not use thread short time no how much
The computer is 1.44 GHZ CPU, do I need to change this computer must take the operation

CodePudding user response:

Thread does not improve performance under the mononuclear,
For image recognition, the most efficient way to increase speed should be reduce the image size
  • Related