CN108090486A - Image processing method and device in a kind of game of billiards - Google Patents
Image processing method and device in a kind of game of billiards Download PDFInfo
- Publication number
- CN108090486A CN108090486A CN201711464888.4A CN201711464888A CN108090486A CN 108090486 A CN108090486 A CN 108090486A CN 201711464888 A CN201711464888 A CN 201711464888A CN 108090486 A CN108090486 A CN 108090486A
- Authority
- CN
- China
- Prior art keywords
- billiard ball
- region
- location information
- elliptic
- projection model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/24—Aligning, centring, orientation detection or correction of the image
- G06V10/245—Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The present invention is suitable for Machine Vision Recognition field, provides image processing method, device and the terminal device in a kind of game of billiards.This method is applied to the system comprising filming apparatus, including:Pass through the video information of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table;Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.Billiard ball shape is ellipse in the image that video information of the present invention includes, and obtains the location information of billiard ball in the image of video information based on projection model, improves the accuracy of location information.In addition, the realization process of the embodiment of the present invention is simple, there is stronger practicability and ease for use.
Description
Technical field
The invention belongs to the image processing method in Machine Vision Recognition Technology field more particularly to a kind of game of billiards and
Device.
Background technology
In recent years machine vision starts to apply in the electronics score of game of billiards.Existing realization method is as follows:Pass through bat
It takes the photograph device to be acquired the video of game of billiards, the position letter for ball of then appearing on the stage by the model acquisition billiard ball table surface of foundation
Breath, then carry out subsequent operation and realize electronics score.Therefore, it is crucial one to obtain the appear on the stage location information of ball of billiard ball table surface
Step.However, billiard ball are considered as circle in existing model, then billiard ball are positioned obtain with the location information of billiard ball.And
And since height of the filming apparatus apart from the table top of billiard table is limited, using filming apparatus as source of vision, it is seen that ball
The shape of (unless positioned at the position at face center) is simultaneously non-circular, therefore billiard ball are considered as circle and necessarily cause the billiard ball got
There are large error even mistakes for location information.
Therefore, it is necessary to a kind of scheme is proposed, to solve the above problems.
The content of the invention
In view of this, an embodiment of the present invention provides the image processing method and device in a kind of game of billiards, to solve
In the prior art the image processing method in game of billiards there are the problem of.
The first aspect of the embodiment of the present invention provides the image processing method in a kind of game of billiards, applied to including bat
The system for taking the photograph device, described image processing method include:
Pass through the video information of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table;
Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure,
Obtain the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
Optionally, the video information includes the corresponding elliptic region of each billiard ball the distributed intelligence on table top;
Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure,
Obtaining the location information of billiard ball includes:
The elliptic region for meeting the projection model is detected from the distributed intelligence;
The corresponding area elliptica of billiard ball in filming apparatus, billiard ball and the distributed intelligence according to the projection model
Based on the location information of the elliptic region for meeting the projection model, this is calculated in the space geometry position relationship in domain
The location information of billiard ball belonging to elliptic region.
Optionally, the filming apparatus, the projection model of billiard ball position are included to from the video information based on structure
It is analyzed, obtaining the location information of billiard ball includes:
The video information is divided into multiple frames;
Based on the projection model, by the corresponding elliptic region of billiard ball and mesa region in each frame in the multiple frame
It is split;
The set of the elliptic region is divided into multiple connected regions;
Obtain the location information of the connected region, and by the position of each elliptic region in the multiple connected region
Information is respectively as the location information of billiard ball corresponding with each elliptic region.
Optionally, the location information of the connected region is obtained, and by each area elliptica in the multiple connected region
The location information in domain includes respectively as the location information of billiard ball corresponding with each elliptic region:
The connected region is divided into isolated area, obtains the location information of each isolated area, and by described in
The location information of isolated area is respectively as the location information of billiard ball corresponding with the isolated area.
Optionally, the location information of the connected region is obtained, and by each area elliptica in the multiple connected region
The location information in domain includes respectively as the location information of billiard ball corresponding with each elliptic region:
Obtain the size of connected region;
The size with default threshold value match and obtains matching result;
Multiple circles not overlapped each other are extracted from connected region based on the matching result, each circle is one corresponding
Meet the projection model and be cut in the circumscribed ellipse of the circle outside, the union that the circumscribed ellipse occupies region is the connected region
Domain.
The second aspect of the embodiment of the present invention provides the image processing apparatus in a kind of game of billiards, including:
Acquisition module, for being believed by the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table
Breath;
Analysis module, for based on structure include the filming apparatus, billiard ball position projection model to the video
Information is analyzed, and obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
Optionally, the video information includes the corresponding elliptic region of each billiard ball the distributed intelligence on table top;
The analysis module includes:
Detection unit, for detecting to meet the elliptic region of the projection model from the distributed intelligence;
Computing unit, for platform in filming apparatus, billiard ball and the distributed intelligence according to the projection model
The space geometry position relationship of the corresponding elliptic region of ball, the position letter based on the elliptic region for meeting the projection model
The location information of the billiard ball belonging to the elliptic region is calculated in breath.
Optionally, the analysis module includes:
First division unit, for the video information to be divided into multiple frames;
Cutting unit, for being based on the projection model, by the corresponding ellipse of billiard ball in each frame in the multiple frame
Region and mesa region are split;
Second division unit, for the set of the elliptic region to be divided into multiple connected regions;
Acquiring unit, for obtaining the location information of the connected region, and will be each in the multiple connected region
The location information of elliptic region is respectively as the location information of billiard ball corresponding with each elliptic region.
Optionally, the acquiring unit includes:
Subelement is divided, for the connected region to be divided into isolated area, obtains the position of each isolated area
Confidence ceases, and using the location information of the isolated area as the location information of billiard ball corresponding with the isolated area.
Optionally, the acquiring unit includes:
Subelement is obtained, for obtaining the size of connected region;
Coupling subelement obtains matching result for default threshold value match the size;
Subelement is extracted, for extracting multiple circles not overlapped each other from connected region based on the matching result,
Each corresponding one of circle meets the projection model and is cut in the circumscribed ellipse of the circle outside, and the circumscribed ellipse occupies region
Union is the connected region;The location information of the multiple circle not overlapped each other is converted into the location information of billiard ball.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, which is characterized in that described in the processor performs
The step of method in first aspect is realized during computer program.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, which is characterized in that side in first aspect is realized when the computer program is executed by processor
The step of method.
In embodiments of the present invention, the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table is passed through
Information;Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains
The location information of billiard ball, billiard ball shape is ellipse in the image that the video information includes.Video information bag of the embodiment of the present invention
Billiard ball shape is ellipse in the image contained, obtains the location information of billiard ball in the image of video information based on projection model, improves
The accuracy of location information.In addition, the realization process of the embodiment of the present invention is simple, there is stronger practicability and ease for use.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the realization flow diagram of the image processing method in the game of billiards that the embodiment of the present invention one provides;
Fig. 2 is the schematic diagram of the projection model of the image processing method in game of billiards provided in an embodiment of the present invention;
Fig. 3 is the specific implementation flow diagram of step S102 in the embodiment of the present invention one;
Fig. 4 is another specific implementation flow diagram of step S102 in the embodiment of the present invention one;
Fig. 5-A are the schematic diagrames of the connected region formed after three elliptic regions of the embodiment of the present invention are overlapped;
Fig. 5-B are the schematic diagrames for the connected region that one elliptic region of the embodiment of the present invention is formed;
Fig. 5-C are the signals of the extraction result of the connected region formed after the embodiment of the present invention is overlapped three elliptic regions
Figure;
Fig. 5-D are the pilot process of the extraction of the connected region formed after the embodiment of the present invention is overlapped three elliptic regions
Schematic diagram;
Fig. 6 is the specific implementation flow diagram of step S304 in the embodiment of the present invention;
Fig. 7 is the structure diagram for the terminal device that the embodiment of the present invention four provides;
Fig. 8 is the schematic diagram of the image processing apparatus in the game of billiards that the embodiment of the present invention five provides.
Specific embodiment
In being described below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specifically
The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity
Road and the detailed description of method, in case unnecessary details interferes description of the invention.
It it should be appreciated that ought be special described by the instruction of term " comprising " use in this specification and in the appended claims
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded from one or more of the other feature, entirety, step,
Operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combinations and all possible combinations of one or more of the associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that "
Or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to
Determine " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.Need what is illustrated
It is that following embodiment is applied to the system comprising filming apparatus.
Embodiment one
Fig. 1 shows the realization flow signal of the image processing method in the game of billiards that the embodiment of the present invention one provides
Figure.As shown in Figure 1, the image processing method in the game of billiards specifically may include steps of:
Step S101:Believed by the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table
Breath.
Wherein, filming apparatus can be camera, and camera refers to the equipment that can gather video or image sequence, can
To be camera etc. that industrial camera, IP Camera, monitoring camera, computer itself are equipped with.
Step S102:The filming apparatus, the projection model of billiard ball position are included to the video information based on structure
It is analyzed, obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
Model is projected as shown in Fig. 2, construction is using the camera optical center circular cone tangent as vertex and with ball, it is where table top
The section (i.e. billiard ball are in projection of the plane) that plane is cut is ellipse, this is exactly the shape that ball is presented in the picture.It is aobvious and easy
The premise seen is that the physical size of billiard ball is fixed, and since ball under normal circumstances is always tangent with plane where table top,
Therefore billiard ball position is mutually determined with vertical projection point of the centre of sphere in table top.It at this moment, can be in the case of known billiard ball position
Calculate oval position (i.e. ellipse center location) and elliptical shape (including long axis length, minor axis length, long axis direction);Anti- mistake
Come, in the case of known oval position, can derive the location information and elliptical shape of billiard ball.Above-mentioned position and length can
To be based on table top physical coordinates, image coordinate or normalized coordinate etc. can also be based on.It should be noted that it is opened up in Fig. 2
What is shown is the camera primary optical axis ideal situation vertical with table top, even if in fact primary optical axis and table top out of plumb, ball is in image
In still in ellipse, and above-mentioned parameter still can be derived mutually.
It is mentioned above, it is known that oval position (i.e. elliptical center point position) can derive billiard ball position and elliptical shape
(including long axis length, minor axis length, long axis direction).A kind of embodiment is:
Using table top center as origin, table top is Z=0 planes, and table top long side direction is X-direction, and table top broadside is Y
Direction of principal axis establishes coordinate system.If camera optical center is located at directly over table top center and apart from table top h, then its coordinate is (0,0, h).
If billiard ball position is (x, y), radius is known as r, and acquiescence is positioned on table top, then its sphere centre coordinate is (x, y, r).With top
For point for (0,0, h), it is the tangent circular cone of ball that (x, y, r) radius is r to do one with the centre of sphere, intersects with Z=0 planes, obtains
Ellipse is to project ellipse, if its center is (x', y'), long axis length a, minor axis length b, long axis direction θ.
Billiard ball projection positive process be:Known h, x, y, r ask x', y', a, b, θ.This is by establishing circular cone equation and asking
Solution circular cone is easily done with the equation of combining of plane.In turn, actual needs is known h, x', y', r, asks x, y, a,
b,θ.This is needed x, and y is quantitative as treating, that equally establishes circular cone equation and solve circular cone and plane combines equation, can anti-mistake
X, y is obtained.It is actual to also have many alternatives the above are a kind of realization method for comparing specification, it does not enumerate.
As a preferred embodiment of the present embodiment, the video information exists including the corresponding elliptic region of each billiard ball
Distributed intelligence on table top;
As shown in figure 3, the filming apparatus, the projection model of billiard ball position are included to the video information based on structure
It is analyzed, the location information for obtaining billiard ball includes the following steps:
Step S201:The elliptic region for meeting the projection model is detected from the distributed intelligence.
Wherein, distributed intelligence can be distribution situation of the elliptic region on table top, Ke Yishi:All elliptic regions it
Between all there is no overlapping region, i.e., all elliptic regions are independent;Can also be:At least one elliptic region is independent
, there is overlapping in two or more elliptic region;It can also be:All elliptic regions be not it is independent, i.e.,
Elliptic region overlapping oval for any one, at least adjacent thereto.Wherein, above-mentioned overlapping region refers generally to partly overlap.
The elliptic region for meeting the projection model is detected from distributed intelligence, can also be that detection meets the ellipse of the projection model
Circle contour, for example, directly applying Hough transformation (Hough Transform) or random sampling unification algorism (random
Sample consensus, RANSAC) method, directly detect that all meet (x', y', a, b, θ) are constrained from distributed intelligence
Ellipse.
It should be noted that elliptic region is solid (region that curve surrounds), elliptic contour is hollow (closing song
Line), if it is mentioned that " ellipse " then includes elliptic region or elliptic contour both of these case, can based on context be understood.
It is understood that elliptic region includes the elliptic contour of the elliptic region, therefore the implementation method of above-mentioned detection can also be
Elliptic region is first detected, further detects the elliptic contour for meeting the projection model;Alternatively, first detect elliptic region
Elliptic contour, further detection meet the elliptic region of the projection model, are not intended to limit the guarantor of the embodiment of the present invention herein
Protect scope.
Step S202:The billiard ball pair in filming apparatus, billiard ball and the distributed intelligence according to the projection model
The space geometry position relationship for the elliptic region answered, based on it is described meet it is described projection model elliptic region location information,
The location information of the billiard ball belonging to the elliptic region is calculated.
As another preferred embodiment of the present embodiment, as shown in figure 4, based on structure include the filming apparatus,
To being analyzed from the video information, the location information for obtaining billiard ball includes the following steps the projection model of billiard ball position:
Step S301:The video information is divided into multiple frames.
Frame is exactly the single width image frame of least unit in video information, and a frame is exactly a secondary static picture, continuously
Frame just forms animation.Video information is divided into multiple frames, that is, is divided into multiple pictures, each picture forms an image.
Step S302:Based on the projection model, by the corresponding elliptic region of billiard ball in each frame in the multiple frame
It is split with mesa region.
It is understood that the corresponding elliptic region of billiard ball is projected in the plane where table top, wherein, due to platform
Face is held essentially constant, and therefore, can be based on the projection model, and the billiard ball in each frame in the multiple frame are corresponding ellipse
Circle region and mesa region are split, and obtain all elliptic regions.
Step S303:The set of the elliptic region is divided into multiple connected regions.
Wherein, region as shown in fig. 5-A is the connected region formed after three elliptic regions are overlapped.It is appreciated that
It is that the region shown in Fig. 5-B is the connected region that an elliptic region is formed.
Step S304:Obtain the location information of the connected region, and by each ellipse in the multiple connected region
The location information in region is respectively as the location information of billiard ball corresponding with each elliptic region.
Step S304 includes two kinds of situations:
The first situation makes area independent one by one, it is necessary to the region being overlapped in connected region is divided
Domain;
Second case need not divide the region being overlapped in connected region, can carry out Fuzzy Processing.
Wherein, the first situation can be realized as follows.The location information of the connected region is obtained, and will
The location information of each elliptic region in the multiple connected region respectively as with each corresponding of elliptic region
The location information of ball includes:
The connected region is divided into isolated area, obtains the location information of each isolated area, and by described in
The location information of isolated area is respectively as the location information of billiard ball corresponding with the isolated area.
Elliptic region is divided into one by one not overlapping region, illustratively, the connected region shown in Fig. 5-A is extracted
Result as shown in fig. 5-c.Such as implementations below:Image in video information is switched into gray-scale map, with fixed threshold (such as
200) or adaptive threshold (such as knows on table top there is n ball, then with all pixels gray scale from high to low using previous tracking result
The gray value of 20n is come as threshold value) by image binaryzation, so as to be divided into elliptic region and mesa region, area elliptica
Each connected region in domain corresponds to a billiard ball.Here with the billiard ball of whatsoever color all specular is equipped in centre bit
The characteristic in domain, and the highlight area of adjacent billiard ball will not overlap.
In second case, based on above-mentioned connected region, wherein being formed after being overlapped there may be two elliptic regions
Connected region or the overlapping of three elliptic regions after form after connected region even three or more the elliptic regions overlappings that form
Connected region.In other words, or each connected region is the elliptic region of single billiard ball or is adjacent several ellipses
Region adhesion forms.The form parameter of elliptic region is related with oval position, but is approximately considered in a connected region constant.
Projection model is established using connected region center as oval position, thus obtained elliptical shape pixelation is made with it
Morphological erosion is carried out to connected region for template, several small connected regions are obtained after corrosion, each small connected region is pair
A billiard ball are answered, using the location information of each small connected region as the location information of corresponding billiard ball.It should be noted that because
This, the present embodiment can realize the Fuzzy Processing to connected region, i.e., need not have the connected region of overlapping to elliptic region
It is split and is handled again, treatment effeciency is high.
As another embodiment of second case, further, as shown in fig. 6, obtaining the position of the connected region
Confidence cease, and using the location information of each elliptic region in the multiple connected region as with each area elliptica
The location information of the corresponding billiard ball in domain can include:
Step S401:Obtain the size of connected region.
Step S402:The size with default threshold value match and obtains matching result.
Step S403:Multiple circles not overlapped each other, Mei Geyuan are extracted from connected region based on the matching result
All corresponding one meets the projection model and is cut in the circumscribed ellipse of the circle outside, and the union that the circumscribed ellipse occupies region is
The connected region;The location information of the multiple circle not overlapped each other is converted into the location information of billiard ball.
For step S402 and S403, illustratively, established using the center of connected region as oval position oval
Model determines form parameter, first calculates the oval number m in the connected region, then that m is calculated to the connected region is ellipse
Circle center thereby determines that the ellipse of the m form parameters, it is desirable that the union in this m elliptic overlay region is precisely entire
Connected region, and this m elliptical inscribed circles do not overlap each other.If number m and m center above can not be calculated,
Can exhaustion go out to be possible to, then therefrom select satisfactory matching result.
Illustratively, to the result that the connected region shown in Fig. 5-A extracts as shown in Fig. 5-D.
In this preferred embodiment, multiple do not overlap each other is partitioned by the way that there will be the connected regions of overlapping region
Circle obtains the location information of each isolated area, i.e., the center location of inscribed circle is carried out the seat obtained after coordinate conversion
It is denoted as the coordinate of billiard ball vertical projection point.It should be noted that in the present embodiment, it is of interest that the relative position before billiard ball
Rather than the absolute position of each billiard ball, therefore this approximate processing can't influence the accuracy of billiard ball location information, instead
The efficiency of processing is improved, optimizes algorithm.
In embodiments of the present invention, the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table is passed through
Information;Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains
The location information of billiard ball, billiard ball shape is ellipse in the image that the video information includes.Video information bag of the embodiment of the present invention
Billiard ball shape is ellipse in the image contained, obtains the location information of billiard ball in the image of video information based on projection model, improves
The accuracy of location information.In addition, the realization process of the embodiment of the present invention is simple, there is stronger practicability and ease for use.
It is to be understood that the size of the sequence number of each step is not meant to the priority of execution sequence, each process in above-described embodiment
Execution sequence should determine that the implementation process without tackling the embodiment of the present invention forms any limit with its function and internal logic
It is fixed.
Embodiment two
Fig. 7 is refer to, it illustrates the structures of the image processing apparatus in game of billiards provided by Embodiment 2 of the present invention
Block diagram.Image processing apparatus 70 in game of billiards includes:Acquisition module 71 and analysis module 72.Wherein, each module is specific
Function is as follows:
Acquisition module 71, for being believed by the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table
Breath;
Analysis module 72 regards for the projection model including the filming apparatus, billiard ball position based on structure to described
Frequency information is analyzed, and obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
Optionally, the video information includes the corresponding elliptic region of each billiard ball the distributed intelligence on table top;
The analysis module 72 includes:
Detection unit, for detecting to meet the elliptic region of the projection model from the distributed intelligence;
Computing unit, for platform in filming apparatus, billiard ball and the distributed intelligence according to the projection model
The space geometry position relationship of the corresponding elliptic region of ball, the position letter based on the elliptic region for meeting the projection model
The location information of the billiard ball belonging to the elliptic region is calculated in breath.
Optionally, the analysis module 72 includes:
First division unit, for the video information to be divided into multiple frames;
Cutting unit, for being based on the projection model, by the corresponding ellipse of billiard ball in each frame in the multiple frame
Region and mesa region are split;
Second division unit, for the set of the elliptic region to be divided into multiple connected regions;
Acquiring unit, for obtaining the location information of the connected region, and will be each in the multiple connected region
The location information of elliptic region is respectively as the location information of billiard ball corresponding with each elliptic region.
Optionally, the acquiring unit includes:
Subelement is divided, for the connected region to be divided into isolated area, obtains the position of each isolated area
Confidence ceases, and using the location information of the isolated area as the location information of billiard ball corresponding with the isolated area.
Optionally, the division subelement is included:
Subelement is obtained, for obtaining the size of connected region;
Coupling subelement obtains matching result for default threshold value match the size;
Subelement is extracted, for extracting multiple circles not overlapped each other from connected region based on the matching result,
Each corresponding one of circle meets the projection model and is cut in the circumscribed ellipse of the circle outside, and the circumscribed ellipse occupies region
Union is the connected region;The location information of the multiple circle not overlapped each other is converted into the location information of billiard ball.
In embodiments of the present invention, the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table is passed through
Information;Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains
The location information of billiard ball, billiard ball shape is ellipse in the image that the video information includes.Video information bag of the embodiment of the present invention
Billiard ball shape is ellipse in the image contained, obtains the location information of billiard ball in the image of video information based on projection model, improves
The accuracy of location information.In addition, the realization process of the embodiment of the present invention is simple, there is stronger practicability and ease for use.
Embodiment three
Fig. 8 is the schematic diagram for the terminal device that the embodiment of the present invention three provides.As shown in figure 8, the terminal of the embodiment is set
Standby 8 include:Processor 80, memory 81 and it is stored in the meter that can be run in the memory 81 and on the processor 80
Calculation machine program 82, such as the image processing method program in game of billiards.The processor 80 performs the computer program 82
The step in image processing method embodiment in the above-mentioned each game of billiards of Shi Shixian, such as step S101 shown in FIG. 1 is extremely
S102.Alternatively, the processor 80 realizes the work(of each module in above-mentioned each device embodiment when performing the computer program 82
Can, such as the function of module 81 to 82 shown in Fig. 8.
Illustratively, the computer program 82 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 81, and are performed by the processor 80, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 82 in the terminal device 8 is described.For example, the computer program 82 can be divided
Acquisition module and analysis module are cut into, the concrete function of each module is as follows:
Acquisition module, for being believed by the video of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table
Breath;
Analysis module, for based on structure include the filming apparatus, billiard ball position projection model to the video
Information is analyzed, and obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
The terminal device 8 can be that the calculating such as desktop PC, notebook, palm PC and cloud server are set
It is standby.The terminal device may include, but be not limited only to, processor 80, memory 81.It will be understood by those skilled in the art that Fig. 8
The only example of terminal device does not form the restriction to terminal device, can include than illustrating more or fewer components,
Some components or different components are either combined, such as the terminal device can also include input-output equipment, network connects
Enter equipment, bus etc..
Alleged processor 80 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng.
The memory 81 can be the internal storage unit of the terminal device 8, such as the hard disk of terminal device 8 or interior
It deposits.The memory 81 can also be the External memory equipment of the terminal device 8, such as be equipped on the terminal device 8
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card) etc..Further, the memory 81 can also both include the storage inside list of the terminal device 8
Member also includes External memory equipment.The memory 81 is used to store needed for the computer program and the terminal device
Other programs and data.The memory 81 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work(
Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device are divided into different functional units or module, more than completion
The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used
To be that unit is individually physically present, can also two or more units integrate in a unit, it is above-mentioned integrated
The form that hardware had both may be employed in unit is realized, can also be realized in the form of SFU software functional unit.In addition, each function list
Member, the specific name of module are not limited to the protection domain of the application also only to facilitate mutually distinguish.Above system
The specific work process of middle unit, module may be referred to the corresponding process in preceding method embodiment, and details are not described herein.
In the above-described embodiments, all emphasize particularly on different fields to the description of each embodiment, be not described in detail or remember in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that each exemplary lists described with reference to the embodiments described herein
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is performed with hardware or software mode, specific application and design constraint depending on technical solution.Professional technician
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, is only a kind of division of logic function, there can be other dividing mode in actual implementation, such as
Multiple units or component may be combined or can be integrated into another system or some features can be ignored or does not perform.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, device
Or the INDIRECT COUPLING of unit or communication connection, can be electrical, machinery or other forms.
It is described to be converted to the unit that separating component illustrates and may or may not be physically separate, be converted to list
The component of member display may or may not be physical location, you can be located at a place or can also be distributed to
In multiple network element.Some or all of unit therein can be selected to realize this embodiment scheme according to the actual needs
Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be employed in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit, which is realized and converted in the form of SFU software functional unit, is independent production marketing
Or it in use, can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned reality
All or part of flow in a method is applied, relevant hardware can also be instructed to complete by computer program, it is described
Computer program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that
The step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, the computer program
Code can be source code form, object identification code form, executable file or some intermediate forms etc..Computer-readable Jie
Matter can include:Can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk,
Magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It is it should be noted that described
The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice
Subtract, such as in some jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity
Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality
Example is applied the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to foregoing each
Technical solution recorded in embodiment modifies or carries out equivalent substitution to which part technical characteristic;And these are changed
Or replace, the essence of appropriate technical solution is not made to depart from the spirit and scope of various embodiments of the present invention technical solution, it should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of image processing method in game of billiards, which is characterized in that applied to the system comprising filming apparatus, the figure
As processing method includes:
Pass through the video information of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table;
Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains
The location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
2. the image processing method in game of billiards according to claim 1, which is characterized in that the video information includes
Distributed intelligence of the corresponding elliptic region of each billiard ball on table top;
Analyzing the video information including the filming apparatus, the projection model of billiard ball position based on structure, obtains
The location information of billiard ball includes:
The elliptic region for meeting the projection model is detected from the distributed intelligence;
The corresponding elliptic region of billiard ball in filming apparatus, billiard ball and the distributed intelligence according to the projection model
Based on the location information of the elliptic region for meeting the projection model, the ellipse is calculated in space geometry position relationship
The location information of billiard ball belonging to region.
3. the image processing method in game of billiards according to claim 1, which is characterized in that institute is included based on structure
Filming apparatus, the projection model of billiard ball position are stated to being analyzed from the video information, obtaining the location information of billiard ball includes:
The video information is divided into multiple frames;
Based on the projection model, the corresponding elliptic region of billiard ball in each frame in the multiple frame and mesa region are carried out
Segmentation;
The set of the elliptic region is divided into multiple connected regions;
Obtain the location information of the connected region, and by the location information of each elliptic region in the multiple connected region
Respectively as the location information of billiard ball corresponding with each elliptic region.
4. the image processing method in game of billiards according to claim 3, which is characterized in that obtain the connected region
Location information, and using the location information of each elliptic region in the multiple connected region as with it is described each ellipse
The location information of the corresponding billiard ball in circle region includes:
The connected region is divided into isolated area, obtains the location information of each isolated area, and by the independence
The location information in region is respectively as the location information of billiard ball corresponding with the isolated area.
5. the image processing method in game of billiards as claimed in claim 3, which is characterized in that obtain the connected region
Location information, and using the location information of each elliptic region in the multiple connected region as with each ellipse
The location information of the corresponding billiard ball in region includes:
Obtain the size of connected region;
The size with default threshold value match and obtains matching result;
Multiple circles not overlapped each other are extracted from connected region based on the matching result, each corresponding one of circle meets
Described to project model and be cut in the circumscribed ellipse of the circle outside, the union that the circumscribed ellipse occupies region is the connected region;
The location information of the multiple circle not overlapped each other is converted into the location information of billiard ball.
6. a kind of image processing apparatus in game of billiards, which is characterized in that including:
Acquisition module, for passing through the video information of the billiard ball on table top and table top of the filming apparatus acquisition comprising billiard table;
Analysis module, for based on structure include the filming apparatus, billiard ball position projection model to the video information
It is analyzed, obtains the location information of billiard ball;Billiard ball shape is ellipse in the image that the video information includes.
7. the image processing apparatus in game of billiards according to claim 6, which is characterized in that the video information includes
Distributed intelligence of the corresponding elliptic region of each billiard ball on table top;
The analysis module includes:
Detection unit, for detecting to meet the elliptic region of the projection model from the distributed intelligence;
Computing unit, for billiard ball pair in filming apparatus, billiard ball and the distributed intelligence according to the projection model
The space geometry position relationship for the elliptic region answered, based on it is described meet it is described projection model elliptic region location information,
The location information of the billiard ball belonging to the elliptic region is calculated.
8. the image processing apparatus in game of billiards according to claim 6, which is characterized in that the analysis module bag
It includes:
First division unit, for the video information to be divided into multiple frames;
Cutting unit, for being based on the projection model, by the corresponding elliptic region of billiard ball in each frame in the multiple frame
It is split with mesa region;
Second division unit, for the set of the elliptic region to be divided into multiple connected regions;
Acquiring unit, for obtaining the location information of the connected region, and by each ellipse in the multiple connected region
The location information in region is respectively as the location information of billiard ball corresponding with each elliptic region.
9. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when performing the computer program
The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of realization such as any one of claim 1 to 5 the method.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711464888.4A CN108090486B (en) | 2017-12-28 | 2017-12-28 | Image processing method and device in billiard game |
| PCT/CN2018/115386 WO2019128504A1 (en) | 2017-12-28 | 2018-11-14 | Method and apparatus for image processing in billiards game, and terminal device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711464888.4A CN108090486B (en) | 2017-12-28 | 2017-12-28 | Image processing method and device in billiard game |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108090486A true CN108090486A (en) | 2018-05-29 |
| CN108090486B CN108090486B (en) | 2020-06-09 |
Family
ID=62180422
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711464888.4A Active CN108090486B (en) | 2017-12-28 | 2017-12-28 | Image processing method and device in billiard game |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108090486B (en) |
| WO (1) | WO2019128504A1 (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108960098A (en) * | 2018-06-22 | 2018-12-07 | 梁栋 | A kind of billiard ball collision relation recognition method and game of billiards scoring system |
| CN109011534A (en) * | 2018-08-08 | 2018-12-18 | Oppo广东移动通信有限公司 | Billiard ball batting householder method, device, storage medium and electronic equipment |
| WO2019128504A1 (en) * | 2017-12-28 | 2019-07-04 | 深圳市超级视觉科技有限公司 | Method and apparatus for image processing in billiards game, and terminal device |
| CN110334617A (en) * | 2019-06-20 | 2019-10-15 | 梁栋 | The judgment method and game of billiards scoring system on a kind of billiard ball collision library side |
| CN110443859A (en) * | 2019-07-30 | 2019-11-12 | 佛山科学技术学院 | A kind of billiards based on computer vision foul judgment method and system |
| CN112891909A (en) * | 2019-11-19 | 2021-06-04 | 杨清平 | Snooker scoring device |
| CN113164810A (en) * | 2018-11-23 | 2021-07-23 | 金贤哲 | Billiard room auxiliary system and server thereof |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110021257A1 (en) * | 2009-07-27 | 2011-01-27 | Obscura Digital Inc. | Automated enhancements for billiards and the like |
| CN102252661A (en) * | 2011-04-02 | 2011-11-23 | 华南理工大学 | Globoid three-dimensional positioning method for machine vision |
| CN103955693A (en) * | 2013-05-06 | 2014-07-30 | 北京瑞盖科技有限公司 | Nine-ball computer-assisted detection identification method |
| CN104954750A (en) * | 2015-06-18 | 2015-09-30 | 北京共创普惠科技有限公司 | Data processing method and device for billiard system |
| CN105107190A (en) * | 2015-09-15 | 2015-12-02 | 清华大学 | Image collecting and processing system applied to Chinese billiards and image processing method |
| CN106952307A (en) * | 2017-03-22 | 2017-07-14 | 广东工业大学 | Method and system for positioning a sphere in an image |
| KR101757788B1 (en) * | 2015-12-17 | 2017-07-14 | 연세대학교 산학협력단 | Method and Apparatus of Scoring Pool |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104740866A (en) * | 2013-12-27 | 2015-07-01 | 唐方旭 | Precise positioning device for resetting balls in snooker |
| CN105261048B (en) * | 2015-09-11 | 2018-02-06 | 中国人民解放军信息工程大学 | A kind of accurate positioning method of center of pellet cone beam projection position |
| CN107270812A (en) * | 2017-06-26 | 2017-10-20 | 江苏密斯欧智能科技有限公司 | Target ball recognition methods in a kind of automatic assembling |
| CN108090486B (en) * | 2017-12-28 | 2020-06-09 | 深圳市超级视觉科技有限公司 | Image processing method and device in billiard game |
| CN108079565B (en) * | 2017-12-28 | 2019-11-08 | 深圳市超级视觉科技有限公司 | A kind of game of billiards scoring system |
-
2017
- 2017-12-28 CN CN201711464888.4A patent/CN108090486B/en active Active
-
2018
- 2018-11-14 WO PCT/CN2018/115386 patent/WO2019128504A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110021257A1 (en) * | 2009-07-27 | 2011-01-27 | Obscura Digital Inc. | Automated enhancements for billiards and the like |
| CN102252661A (en) * | 2011-04-02 | 2011-11-23 | 华南理工大学 | Globoid three-dimensional positioning method for machine vision |
| CN103955693A (en) * | 2013-05-06 | 2014-07-30 | 北京瑞盖科技有限公司 | Nine-ball computer-assisted detection identification method |
| CN104954750A (en) * | 2015-06-18 | 2015-09-30 | 北京共创普惠科技有限公司 | Data processing method and device for billiard system |
| CN105107190A (en) * | 2015-09-15 | 2015-12-02 | 清华大学 | Image collecting and processing system applied to Chinese billiards and image processing method |
| KR101757788B1 (en) * | 2015-12-17 | 2017-07-14 | 연세대학교 산학협력단 | Method and Apparatus of Scoring Pool |
| CN106952307A (en) * | 2017-03-22 | 2017-07-14 | 广东工业大学 | Method and system for positioning a sphere in an image |
Non-Patent Citations (2)
| Title |
|---|
| YAN LING: "《The Detection of Multi-Objective Billiards in Snooker Game Video》", 《2012 THIRD INTERNATIONAL CONFERENCE ON INTELLIGENT CONTROL AND INFORMATION PROCESSING》 * |
| 屈静军: "《基于卡尔曼滤波的斯诺克视频中台球检测与跟踪技术研究》", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019128504A1 (en) * | 2017-12-28 | 2019-07-04 | 深圳市超级视觉科技有限公司 | Method and apparatus for image processing in billiards game, and terminal device |
| CN108960098A (en) * | 2018-06-22 | 2018-12-07 | 梁栋 | A kind of billiard ball collision relation recognition method and game of billiards scoring system |
| CN108960098B (en) * | 2018-06-22 | 2022-04-01 | 梁栋 | Billiard collision relation recognition method and billiard game scoring system |
| CN109011534A (en) * | 2018-08-08 | 2018-12-18 | Oppo广东移动通信有限公司 | Billiard ball batting householder method, device, storage medium and electronic equipment |
| CN109011534B (en) * | 2018-08-08 | 2020-08-04 | Oppo广东移动通信有限公司 | Billiard hitting auxiliary method, device, storage medium and electronic device |
| CN113164810A (en) * | 2018-11-23 | 2021-07-23 | 金贤哲 | Billiard room auxiliary system and server thereof |
| CN110334617A (en) * | 2019-06-20 | 2019-10-15 | 梁栋 | The judgment method and game of billiards scoring system on a kind of billiard ball collision library side |
| CN110443859A (en) * | 2019-07-30 | 2019-11-12 | 佛山科学技术学院 | A kind of billiards based on computer vision foul judgment method and system |
| CN112891909A (en) * | 2019-11-19 | 2021-06-04 | 杨清平 | Snooker scoring device |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2019128504A1 (en) | 2019-07-04 |
| CN108090486B (en) | 2020-06-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108090486A (en) | Image processing method and device in a kind of game of billiards | |
| US10977523B2 (en) | Methods and apparatuses for identifying object category, and electronic devices | |
| CN113160257B (en) | Image data labeling method, device, electronic equipment and storage medium | |
| Maire et al. | Using contours to detect and localize junctions in natural images | |
| CN112528831B (en) | Multi-target attitude estimation method, multi-target attitude estimation device and terminal equipment | |
| WO2019228063A1 (en) | Product inspection terminal, method and system, computer apparatus and readable medium | |
| CN108038474A (en) | Method for detecting human face, the training method of convolutional neural networks parameter, device and medium | |
| CN107194361A (en) | Two-dimentional pose detection method and device | |
| CN113392681A (en) | Human body falling detection method and device and terminal equipment | |
| CN114331986A (en) | A method of dam crack identification and measurement based on unmanned aerial vehicle vision | |
| CN110826372B (en) | Facial feature point detection method and device | |
| CN114005149A (en) | A training method and device for a target angle detection model | |
| US11893773B2 (en) | Finger vein comparison method, computer equipment, and storage medium | |
| CN114219073A (en) | Method, device, storage medium and electronic device for determining attribute information | |
| CN115937950B (en) | Multi-angle face data acquisition method, device, equipment and storage medium | |
| CN112036304B (en) | Method, device and computer equipment for recognizing medical bill layout | |
| CN108564569B (en) | A kind of distress in concrete detection method and device based on multicore classification learning | |
| CN114419451B (en) | Method and device for identifying inside and outside of elevator, electronic equipment and storage medium | |
| Chen et al. | Image segmentation based on mathematical morphological operator | |
| WO2022247628A1 (en) | Data annotation method and related product | |
| CN114708239A (en) | Glue width detection method and device, electronic equipment and storage medium | |
| CN119048601A (en) | Pose determination method, pose determination device, pose determination equipment, storage medium and pose determination product | |
| CN117745743B (en) | Automatic generation method and device for cutting path of printed circuit board | |
| CN112212851A (en) | Pose determination method and device, storage medium and mobile robot | |
| CN112634360B (en) | A visual information determination method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |