A kind of virtual cargo path division methods that the parameter for intelligent sales counter is configurable
Technical field
The present invention relates to technical field of computer vision, and in particular to a kind of parameter for intelligent sales counter is configurable
Virtual cargo path division methods.
Background technique
The core concept of intelligent sales counter be it is unlimited reduce the distance between cargo and consumer, focus on facilitating with it is convenient.
This convenient type retail structure has catered to the situation of younger generation group, will be widely welcomed at home, and possesses considerable
International market.It is always seen by technical side, intelligent sales counter is divided into two types: RFID type and computer vision type.
The intelligent sales counter of traditional RFID type, what is mainly utilized is RFID label tag, and RFID mark is sticked on every commodity
Label are to recognize commodity, and the advantage of the intelligent sales counter of this type is RFID technique maturation, and it is general that product is easy large-scale production
And the intelligent sales counter of existing market, it is mostly using RFID technique.The deficiency of RFID technique is that label is easily shielded, damaged, goods
Loss rate is high;On the other hand, every commodity, which require attaching rfid tag, leads to label own cost and paster's work cost not
Phenanthrene, while this technical threshold is low, lacks core competitiveness.
The intelligent sales counter of computer vision type is the research hotspot in the current field, major technique be divided into static identification and
Dynamic Recognition, but without scheme that is especially mature, being suitble to large-scale production.Static state is identified by the feature of identification commodity, wheel
The obvious sign such as exterior feature, color determines the specifying information of commodity, and direct static identify faces very big challenge, in intelligent sales counter
Numerous commodity profile intersections are difficult to divide commodity individual;The numerous and jumbled redundancy of feature, leads to many error hidings;Color abundant but also
Commodity can not be identified by distinguishing color.Commodity are only first divided, static identification could be fast and accurately completed.Traditional is artificial
Dividing commodity leads to extremely low efficiency and compatibility;Affine transformation will can intelligently be sold by the stretching of the x, y-axis direction of image
Counter conversion is rectangular, completes the division of cargo path.But the precision of this method is not high, segmentation is not accurate enough, while stretching and leading
Product features deformation is caused, identification is seriously affected.Although Dynamic Recognition can theoretically not need to divide virtual cargo path, complete
The division of kind virtual cargo path combines simple ranks to judge that the time of Dynamic Recognition can be substantially reduced, and can be with auxiliary judgment
The correctness of identification.
Summary of the invention
For the technical problems in the prior art, the present invention provides a kind of virtual channel for intelligent sales counter stroke
The method divided can be substantially reduced the complexity of operation, save time cost, significantly compared to existing division methods
The accuracy for improving division nor affects on the various signs in surface of commodity, so that intelligence sales counter based on computer vision
Obtain good environment-identification.
The present invention is achieved by the following technical programs:
A kind of virtual cargo path division methods that the parameter for intelligent sales counter is configurable, which comprises the following steps:
S1 chooses image or video frame, and imports in virtual cargo path partitioning algorithm;
S2 divides the row, column number parameter of virtual cargo path according to the selection of the physical conditions of intelligent sales counter;
S3 reads and shows image or video frame, and obtains its pixel size;
S4 goes to S5 when image in S3 or video frame have drift, when image or video frame are not drifted about, skips S5;
S5 is for the drift of image or video frame in S4, and the pixel size configuration parameter obtained using S3 is to choose virtual cargo path quilt
The image or video frame exact extension for including;
S6 obtains the angle of image or video frame to camera, first goes to S5, then configures row, column sighting distance coefficient of diminution.
Preferably, in the S2, divide intelligent sales counter using geometrical perspective phenomenon so that the division of virtual cargo path be in by
The posture that layer height and width successively decrease.
Preferably, in the S2, virtual cargo path to the division of intelligent sales counter is located in intermediate or close with camera
Between the form image shot or the two sides of video frame symmetrically divide;For to be not located at centre or taken the photograph close to middle position
The image or video frame obtained as head, it is virtual as axis point or so division using camera or close to camera position according to counter situation
Cargo path.
Preferably, the virtual cargo path is in the division of intelligent sales counter, by the reduction speed of the weight of power reduction
Be it is exponential, using same column cargo path there are linear correlation, when exponential series are more than or equal to 5, perspective phenomenon causes column cargo path
Influence can destroy the linear relationship, and the relationship is difficult to correct;When exponential series are not more than 5, influence less, to choose
The display of intelligent sales counter is to be located at intermediate with camera or shot close to intermediate form in image or video frame.
Preferably, for require it is extreme accurate divide, the virtual grate of half cargo path is each responsible for using dual camera,
Increase the cargo path weight accounting that small column adjustment parameter adjustment deviates cental axial position.
Preferably, described that resulting image or video frame, coordinate parameters are shot close to intermediate form with camera
Coordinate_b and coordinate_e is configured according to the distance measurements of camera off center.
Preferably, in the S6, configuration parameter row sighting distance coefficient of diminution constant_row and column sighting distance coefficient of diminution
Constant_column adapts to the inclination angle change that camera shoots intelligent sales counter, and the form of expression is cam lens and intelligence
Can sales counter surface angle variation, at the top of the intelligent sales counter that level ground is placed camera show as cam lens with
The variation of acute angle folded by vertical line.
Preferably, same model, the intelligent sales counter of including but not limited to same batch production, in camera position and inclines
In the case that angle variation is small, it is applicable in same coordinate parameters coordinate_b and coordinate_e and row, column sighting distance contracts
Subtract coefficient constant_row and constant_column.
The invention has the benefit that
1. can be according to the visual angle configuration parameter of different angle, compared to traditional division methods, accuracy is obviously improved.
2. the offset and visual angle change for image have certain serious forgiveness, generally by it is bigger that cargo path divides weight
Serious forgiveness it is higher, can allow it is more large-scale offset and visual angle change float.The method that the present invention announces can be with scale
Virtual cargo path division is carried out to the intelligent sales counter of different model, also can use large-scale data training, pass through machine
The method of study divides virtual cargo path automatically.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the flow chart that the virtual channel of intelligence of embodiment of the present invention sales counter divides;
Fig. 2 is perspective phenomenon effect picture.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Embodiment 1
A kind of configurable virtual cargo path division methods of parameter for intelligent sales counter as shown in Figure 1, comprising the following steps:
Step 1, image or video frame are chosen, for the accuracy for guaranteeing division result, it is desirable that sample is of the same race from same angle
Model intelligence sales counter, using a frame as partitioning standards, remaining frame is as verifying.
Step 2, according to the actual conditions of intelligent sales counter configure virtual cargo path row, column number parameter row and
column。
Step 3, read and show image, actually active region is as the region roi in selection image.
Step 4, the region the roi apex coordinate that return step 3 is chosen, calculates roi region height height and width
width。
Step 5, according to step 2 resulting row, column and step 4 resulting height, width, ranks sighting distance is intervened
Coefficient of diminution constant_row, constant_column show that the calculation formula of the high h_std of standard is, the wide w_std of standard is。
Step 6, rule of thumb rule initializes ranks sighting distance coefficient of diminution constant_row and constant_
column。
Step 7, according to step 5 gained h_std and w_st, ranks sighting distance coefficient of diminution constant_ is pressed respectively according to it
The rule of row, constant_column exponential reduction obtains all virtual cargo path row and column width and height.
Step 8, the result of step 7 is applied in the image of selection or video frame, according to display as a result, adjustment
The numerical value of constant_row and constant_column is to adapt to the intelligent sales counter of this angle of this model.
Step 9, the numerical value for recording the constant_row and constant_column of this result, is stored as related warp
Test rule.
The present embodiment compared to existing division methods, can be substantially reduced the complexity of operation, save the time at
This, significantly improves the accuracy of division, the various signs in surface of commodity is nor affected on, so that intelligence based on computer vision
Sales counter obtains good environment-identification.
Embodiment 2
The method that the virtual cargo path that the present embodiment is realized divides is as follows, specifically includes:
Step 1, image or video frame are chosen, image or video frame are imported in virtual cargo path partitioning algorithm;
Step 2, the row, column number parameter of virtual cargo path is divided according to the selection of the physical conditions of intelligent sales counter;
Herein it should be noted that due to vision Fast Reduction, the number of the row and column of counter itself is required, the present invention
The method of announcement be in order to further for the commodity identification in each channel provide it is convenient with may, therefore even if use we
Method marks off virtual cargo path, it is still desirable to consider whether can have cognizable color and feature in the cargo path, it is noted that
The consideration does not influence the correctness and applicability of this method.
Step 3, it reads and shows image or video frame, image or video frame pixel size are read, when image or video frame
When having drift, step 4 is gone to, when image or video frame are not drifted about, skips step 4;
Step 4, for the drift of image or video frame, on the basis of step 3 gained pixel size, configuration parameter is to choose void
Quasi- cargo path by comprising image or video frame exact extension;
It is practical herein it is intended that since there is idle spaces between the cargo path and camera closest to camera
The range of selection can exceed the range scale of image or video frame itself.
Step 5, the angle that image or video frame are obtained for camera, turns first to step 4, then configures row, column view
Away from coefficient of diminution, all parameters can be unchangeably applied in the intelligent sales counter of same model.
The intelligent sales counter to be divided, using geometrical perspective phenomenon so that the division of virtual cargo path in successively height with
The posture that width successively decreases, the remoter goods layer ratio of space length are smaller.
Its principle is that perspective phenomenon is to cause cargo path in image cannot be with conventional the reason of dividing, with shooting point space length
Increase so that cargo path shared weight reduces in the picture, corresponding cargo path occupy smaller weight when dividing.It is different
Although cargo path divide when weight it is different, perspective phenomenon not exclusively change the rule of each cargo path center of gravity inherently, scheme
As in, the cargo path of each row and column still maintains linear correlation, it means that each cargo path can be obtained by way of test
Specific weight value can also obtain weighted value by machine learning point method automatically.
In selected image or video frame, the display of intelligent sales counter is to be located at intermediate or close centre with camera
Form shooting, virtual cargo path symmetrically draw the two sides that the division of intelligent sales counter is the image or video frame obtained in this way
Point;For be not located at centre or close to middle position camera obtain image or video frame, can according to counter situation with
Camera is that axis point or so divides virtual cargo path close to camera position.
Its principle be by power reduction weight reduction speed be it is exponential, the method that the present invention announces mainly utilizes
There are linear correlations for same column cargo path, and when exponential series are more than or equal to 5, perspective phenomenon influences that this can be destroyed caused by column cargo path
Linear relationship, and the relationship is difficult to correct;When exponential series are not more than 5, influence less, for secondary factors and parameter configuration
The considerations of difficulty or ease, can ignore the influence, and here it is require in selected image or video frame the display of intelligent sales counter to be
It is located at centre with camera or close to the reason of intermediate form shooting.For requiring extreme accurate division, can be taken the photograph using double
As head is each responsible for the virtual grate of half cargo path, also increase the cargo path that small column adjustment parameter adjustment deviates cental axial position
Weight accounting.
Shoot resulting image or video frame close to intermediate form with camera, coordinate parameters coordinate_b and
Coordinate_e can be configured according to the distance measurements of camera off center, and two sides caused by making up because of image drift are not
Balanced error divides target area to achieve the purpose that accurately to modify virtual cargo path.
Configurable parameter row sighting distance coefficient of diminution constant_row and column sighting distance coefficient of diminution constant_column is suitable
The inclination angle for answering camera to shoot intelligent sales counter changes, and the form of expression is cam lens and intelligent sales counter surface angle
Variation, specifically, camera is shown as folded by cam lens and vertical line at the top of the intelligent sales counter that level ground is placed
The variation of acute angle.This variation equally will affect sales counter in the picture away from image base distance, need to combine configuration coordinate ginseng
Number coordinate_b and coordinate_e.
Same model includes but is not limited to the intelligent sales counter that same batch produces, in camera position and change of pitch angle
In the case where small, it is applicable in same coordinate parameters coordinate_b and coordinate_e and row, column sighting distance coefficient of diminution
Constant_row and constant_column.
The method that the virtual cargo path that the present invention announces divides is the number of the natural law and geometrical perspective in conjunction with perspective phenomenon
It is as shown in Figure 2 that principle development gets its perspective effect figure.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each implementation
Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these modification or
Replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.