Home > Net >  Screen capture, according to the text location or color coordinates!!!!!!!!!!!!
Screen capture, according to the text location or color coordinates!!!!!!!!!!!!

Time:10-03

Want to through continuous capture images, and then according to the text contained in images or color piece, find the coordinates of the text, what is the good way to accomplish this?

Or have a better method, find the coordinates of the specified position!!

CodePudding user response:

Problem not described clearly, is in a big picture to find another text on the location of the picture? The two words are the same or similar?

CodePudding user response:

Traverse the picture each pixel, get the current pixel color

CodePudding user response:

refer to the second floor asq985 response:
traversal of each pixel images, get the current pixel color


Is there any sample, consult

CodePudding user response:

reference 1st floor HZTLTGG response:
problem not described clearly, is in a big picture to find another text on the location of the picture? The two words are the same or similar?


Is the coordinates in the system to find the specified desktop text, for example: submit, sure, cancelled

CodePudding user response:

Int height=BMP. Height;
Int width=BMP. Width;
Bitmap newBitMap=new Bitmap (width, height);
Color pixel;
For (int x=0; X & lt; Width; X++)
{
For (int y=0; Y & lt; Height; Y++)
{
Pixel=BMP. GetPixel (x, y);
Int r, g, b, and the result;
Result=0;
R=pixel. R;
G=pixel. G;
B=pixel. B;

The other, if you want to go to simulate click on the button, can use the hook, or their search Windows handle

CodePudding user response:

The authentication code, all you need is YoLo3/SSD

CodePudding user response:

refer to the sixth floor of orange peel ZZZ reply:
authentication code, all you need is YoLo3/SSD


Can not authentication code, detailed said

CodePudding user response:

reference 5 floor asq985 reply:
int height=BMP. Height;
Int width=BMP. Width;
Bitmap newBitMap=new Bitmap (width, height);
Color pixel;
For (int x=0; X & lt; Width; X++)
{
For (int y=0; Y & lt; Height; Y++)
{
Pixel=BMP. GetPixel (x, y);
Int r, g, b, and the result;
Result=0;
R=pixel. R;
G=pixel. G;
B=pixel. B;

The other, if you want to go to simulate click on the button, can use the hook, or their search Windows handle


This should not, because there is more than one button, but the background color is same, only is not the same as the above words

CodePudding user response:

Use visual library, such as OpenCV, visionPro, halcon, etc., with its positioning tools,

CodePudding user response:

references 9/f, lover and response:
with visual library, for example, OpenCV, visionPro, halcon, etc., with its positioning tools,
yes, can give a example under reference

CodePudding user response:

Continuously the interception of picture is what mean? This button will move?

CodePudding user response:

An old library, AForge.Net http://www.aforgenet.com can directly NuGet add reference
Just a few lines of code, an artwork, a button insets, return have coordinate

AForge. Imaging. ExhaustiveTemplateMatching class
 
//create the template matching algorithm 's instance
//use zero similarity to make sure algorithm will dojo.provide anything
ExhaustiveTemplateMatching tm=new ExhaustiveTemplateMatching (0);
//compare two images'
TemplateMatch [] matchings=tm. ProcessImage (image1 and image2);
//check similarity level
If (matchings [0]. Similarity & gt; 0.95 f)
{
//do something with quite similar images'
}

CodePudding user response:

refer to 12 floor HZTLTGG reply:
the old library, AForge.Net http://www.aforgenet.com can directly NuGet add reference
Just a few lines of code, an artwork, a button insets, return have coordinate

AForge. Imaging. ExhaustiveTemplateMatching class
 
//create the template matching algorithm 's instance
//use zero similarity to make sure algorithm will dojo.provide anything
ExhaustiveTemplateMatching tm=new ExhaustiveTemplateMatching (0);
//compare two images'
TemplateMatch [] matchings=tm. ProcessImage (image1 and image2);
//check similarity level
If (matchings [0]. Similarity & gt; 0.95 f)
{
//do something with quite similar images'
}


Just got, what situation, small figure, jammed along while, very, very slow

CodePudding user response:

The
reference 11 floor HZTLTGG response:
continuously the interception of picture is what mean? This button will move?


The location of the button is not fixed, bitter here

CodePudding user response:

reference 5 floor asq985 reply:
int height=BMP. Height;
Int width=BMP. Width;
Bitmap newBitMap=new Bitmap (width, height);
Color pixel;
For (int x=0; X & lt; Width; X++)
{
For (int y=0; Y & lt; Height; Y++)
{
Pixel=BMP. GetPixel (x, y);
Int r, g, b, and the result;
Result=0;
R=pixel. R;
G=pixel. G;
B=pixel. B;

The other, if you want to go to simulate click on the button, can use the hook, or their search Windows handle


GetPixel performance is poor, this must use unsafe code, lockbit what of, one hundred times on performance improvement

CodePudding user response:

orange peel z reference 13 floor response:
Quote: refer to 12 floor HZTLTGG reply:

An old library, AForge.Net http://www.aforgenet.com can directly NuGet add reference
Just a few lines of code, an artwork, a button insets, return have coordinate

AForge. Imaging. ExhaustiveTemplateMatching class
 
//create the template matching algorithm 's instance
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • C#
  • Related