WO2020224089A1 - 图案码位置调整方法、装置及计算机可读存储介质 - Google Patents
图案码位置调整方法、装置及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020224089A1 WO2020224089A1 PCT/CN2019/101894 CN2019101894W WO2020224089A1 WO 2020224089 A1 WO2020224089 A1 WO 2020224089A1 CN 2019101894 W CN2019101894 W CN 2019101894W WO 2020224089 A1 WO2020224089 A1 WO 2020224089A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- code
- window
- terminal
- scanned
- screen
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000006870 function Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000004091 panning Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/14—Transformations for image registration, e.g. adjusting or mapping for alignment of images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
Definitions
- This application relates to the field of image processing, and in particular to a method, device and computer-readable storage medium for adjusting the position of a pattern code.
- Barcodes, two-dimensional codes, and other codes presented in patterns are pattern codes widely used in the mobile Internet era.
- a common usage method is that a user provides a pattern code through a certain terminal, for example, a smart phone, and a professional scanning device scans the code to read the pattern code to realize data interaction.
- the present application provides a method and device for adjusting the position of a pattern code, and a computer-readable storage medium, the main purpose of which is to improve the scanning efficiency of the code scanning device.
- the present application provides an electronic device, which includes a memory, a processor, and a bus.
- the memory includes a pattern code position adjustment readable instruction, and the pattern code position adjustment readable instruction is processed by the The following steps are implemented when the device is executed:
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the screen area of the scanned code terminal overlaps the window range, and the overlapped part is determined as the intersection area of the window of the code scanning device and the screen of the scanned code terminal.
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the convex polygon area enclosed by all the boundaries of the window or the convex polygon area enclosed by the screen of the scanning terminal and the boundary of the window in the picture containing the window is determined as the intersection area.
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the pixel point P4x is the boundary E6, E7 and E8 of the window, or it is determined that the pixel point P5x, the pixel point P5y, the pixel point P6x, and the pixel point P6y are the boundaries E9, E10, E11 and E12 of the window;
- a convex polygon surrounding the borders E1 and E2 of the window and the border of the screen of the terminal to be scanned, or the borders E3, E4, and E5 of the window and the border of the screen of the terminal to be scanned Convex polygon, or the convex polygon that surrounds the boundary E6, E7, and E8 of the window and the boundary of the screen of the terminal to be scanned, or the convex polygon that surrounds the boundary E9, E10, E11 and E12 of the window
- the polygon is determined as the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the pattern code is directly translated into the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the reduced pattern code is translated into the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the reduced screen is translated to the intersection area, so that the pattern code on the screen is within the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the pattern code of the minimum identification size and multiple copies thereof are displayed on the screen of the scanned code terminal, so that the pattern code of the minimum identification size or at least one copy thereof is displayed in the intersection area.
- the present application also provides a pattern code position adjustment method, which includes:
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the screen area of the scanned code terminal overlaps the window range, and the overlapped part is determined as the intersection area of the window of the code scanning device and the screen of the scanned code terminal.
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the convex polygon area enclosed by all the boundaries of the window or the convex polygon area enclosed by the screen of the scanning terminal and the boundary of the window in the picture containing the window is determined as the intersection area.
- calculating the intersection area between the window of the code scanning device and the screen of the scanned terminal includes:
- the pixel point P4x is the boundary E6, E7 and E8 of the window, or it is determined that the pixel point P5x, the pixel point P5y, the pixel point P6x, and the pixel point P6y are the boundaries E9, E10, E11 and E12 of the window;
- a convex polygon surrounding the borders E1 and E2 of the window and the border of the screen of the terminal to be scanned, or the borders E3, E4, and E5 of the window and the border of the screen of the terminal to be scanned Convex polygon, or the convex polygon that surrounds the boundary E6, E7, and E8 of the window and the boundary of the screen of the terminal to be scanned, or the convex polygon that surrounds the boundary E9, E10, E11 and E12 of the window
- the polygon is determined as the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the pattern code is directly translated into the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the reduced pattern code is translated into the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the reduced screen is translated to the intersection area, so that the pattern code on the screen is within the range of the intersection area.
- the moving the pattern code to the range of the intersection area includes:
- the pattern code of the minimum identification size and multiple copies thereof are displayed on the screen of the scanned code terminal, so that the pattern code of the minimum identification size or at least one copy thereof is displayed in the intersection area.
- the present application also provides a computer-readable storage medium, the computer-readable storage medium includes a pattern code position adjustment readable instruction, when the pattern code position adjustment readable instruction is executed by a processor , To achieve any step in the pattern code position adjustment method described above.
- the scanned code terminal can be The displayed pattern code is moved to the range of the intersection area. Therefore, even if the pattern code user’s back to the screen and “blind pairing” with the window of the scanning device causes the pattern code to not fall within the window range, it can still be scanned.
- the code device scans the pattern code displayed on the terminal to be scanned, and correctly recognizes the pattern code, thereby eliminating user obstacles and improving the scanning efficiency of the pattern code when the pattern code is used on a large scale.
- FIG. 1 is a flowchart of implementing a method for adjusting the position of a pattern code provided by an embodiment of the application
- FIG. 2 is a schematic structural diagram of a pattern code position adjustment device provided by an embodiment of the application.
- FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
- the embodiment of the present application provides a method for adjusting the position of a pattern code, which is applied to an electronic device, and the electronic device may be a personal computer, a smart phone, or a tablet computer.
- the pattern code position adjustment method in the embodiment of the present application mainly includes the following steps S101 to S103:
- the scanned code terminal can be any electronic device that can display the pattern code and has a camera, such as a smart phone, a tablet computer, etc.
- the code scanning device can be any electronic device that can read and decode the pattern code
- the pattern code can be a barcode, a two-dimensional code, and other codes that are presented in patterns.
- the camera in this application can face the code scanning device. More precisely, the lens of the camera and the element presenting the pattern code are in the same direction. For example, when the terminal to be scanned is a smartphone, The camera should be a front camera, because smart phones usually rely on the screen to display the pattern code.
- the calculation of the intersection area between the window of the code scanning device and the screen of the scanned code terminal can be performed through the following steps S a 1021 to S a 1024 achieve:
- the so-called feature information of a code scanning device is the key information that can uniquely identify a code scanning device.
- the parting lines at different angles, screws at different positions, and the edges of window components on these code scanning devices , Holes, etc. are the key information that can uniquely identify a scanning device.
- the characteristic information of the code scanning device can be different from those in the examples, or other information, as long as a code scanning device can be uniquely identified, for example, the code scanning device number, engraved ID, and so on.
- S a 1022 Determine the current scanning device according to the extracted characteristic information of the scanning device.
- the scanned terminal After extracting the characteristic information of the scanning device, the scanned terminal uploads the characteristic information to the cloud server. After receiving the characteristic information, the cloud server matches the characteristic information with the characteristic information of the scanning device stored in the database to determine the current scanning device.
- the first window range captured by the terminal to be scanned is determined by comparing the location identifier captured by the terminal to be scanned with the determined full image of the current scanning device (the range of the first window is a relatively rough range ); In the first window range, calculate the distance between the positioning mark and the edge of the window to obtain the precise window range captured by the code scanning terminal.
- step S a 1024 overlap the screen area of the terminal to be scanned with the window range calculated in step S a 1023, and the overlapped part is determined as the intersection area of the window of the scanning device and the screen of the terminal to be scanned.
- the built-in positioning device of the terminal to be scanned for example, the gyroscope sensor, determine the angle and direction of the terminal to be scanned and the horizontal plane, and then the position of the camera of the terminal to be scanned on the screen of the terminal to be scanned and the camera and screen
- the direction determined by the center point can determine a rectangle containing the camera.
- the center point of the window range calculated in step S a 1023 is the projection point of the camera of the scanned terminal, and the size of the scanned terminal, the position of the camera on the scanned terminal and other information are known, according to this known information
- the rectangle of the screen of the scanned terminal overlaps the window of the scanning device determined in step S a 1023, and the common part of the overlap is The intersection area between the window of the scanning device and the screen of the terminal being scanned.
- the calculation of the intersection area between the window of the code scanning device and the screen of the scanned code terminal can be performed through the following steps S b 1021 to S b 1024 implementation:
- the terminal to be scanned has a front camera, which can be used to be photographed by the scanning device in front of the scanning terminal to obtain a picture of the window containing the scanning device.
- the window of the code scanning device here can be the entire window or part of the window.
- a prompt is issued to move the scanning device or the terminal being scanned until the entire window or part of the window of the scanning device appears Within the shooting range of the front camera.
- the step S b 1021 to obtain images of windows comprises at least two boundaries in the picture, i.e. is not completely contained in the picture in the window, the window of the two One or three borders are contained in the picture.
- the window is completely contained in the picture, the four borders of the window are contained in the picture.
- a method for determining the boundary of the window is:
- gray-level mean square error of the current image block is less than the gray-level threshold THr, indicating that the gray-level change in the current image block is not obvious, it is determined that there is no edge in the current image block;
- the gray-level mean square error of the current image block is greater than the gray-level threshold THr, it indicates that the gray level changes strongly in the current image block, and it is determined that there is an edge in the current image block, and this edge is the boundary of the window.
- S b 1023 Determine the boundary of the screen of the terminal to be scanned in the picture containing the window.
- the convex polygonal area enclosed by all the boundaries of the window is the intersection area.
- Another situation is that only part of the border of the window is included in the range of the screen of the terminal to be scanned.
- the border of the screen of the terminal to be scanned in the picture that contains the window and the window The area enclosed by the boundary of may be a convex polygonal area or a concave polygonal area.
- only the convex polygonal area enclosed by the border of the screen of the scanning terminal and the border of the window is the intersection area referred to in this application.
- the plane where the screen of the terminal to be scanned is located can be used as the plane where the coordinate system constructed above is located.
- this plane is referred to as the coordinate system plane here.
- the horizontal axis is obtained from the nearest projection pixel P1x longitudinal distance of the nearest pixel P1y, the horizontal axis or the distance of the nearest pixel P2x, the farthest distance from the horizontal axis and the distance the longitudinal axis pixel P3x
- the passing pixel point P1x and the pixel point P1y are the borders E1 and E2 of the window, or the passing P2x, the pixel point P3x, and the pixel point P2y are the borders E3, E4 and E5 of the window, or the passing pixel P3y
- the pixel point P4y and the pixel point P4x are the boundaries E6, E7, and E8 of the window, or it is determined that the pixel point P5x, the pixel point P5y, the pixel point P6x, and the pixel point P6y are the boundaries E9, E10, E11, and E12 of the window.
- the mobile scanning device and/or the terminal to be scanned is prompted to expand the area of the intersection area.
- the expansion of the intersection area makes the subsequent pattern code only need to be translated without first zooming and then panning, so that the pattern code pattern can be included in the intersection area.
- the pattern code displayed on the scanned code terminal is not completely within the range of the intersection area, which means that part of the pattern code is outside the range of the intersection area, and the pattern code is moved to the range of the intersection area. It means that the area formed by the border of the pattern code is all included in the range of the intersection area, that is, the border of the pattern code is not outside the edge of the intersection area.
- moving the pattern code to the range of the intersection area may be: directly translate the pattern code to the range of the intersection area.
- moving the pattern code to the range of the intersection area may be: shrink the pattern code, and then translate the reduced pattern code pattern to the range of the intersection area.
- moving the pattern code to the range of the intersection area may be: shrinking the screen of the terminal being scanned, and shifting the reduced screen to the intersection area or to the intersection area, so that the screen The pattern code of is within the range of the intersection area.
- moving the pattern code to the range of the intersection area may be: reducing the pattern code to the smallest identification size that can be recognized, and then reducing the pattern code with the smallest identification size and its multiple copies It is displayed on the screen of the scanned code terminal, so that the pattern code of the smallest identification size or at least one copy thereof is displayed in the intersection area.
- the pattern code displayed on the terminal being scanned can be moved to the intersection area Therefore, even if the pattern code does not fall within the range of the window due to the user’s back to the screen and "blind pairing" of the scanning device’s window, the scanning device can still scan to the scanned terminal
- the pattern code presented above can correctly identify the pattern code, thereby eliminating the user's obstacles to use, and also enables the scanning efficiency of the pattern code to be improved when the pattern code is used on a large scale.
- FIG. 2 provides a pattern code position adjustment device according to an embodiment of the application.
- the electronic device can be used to implement the pattern code position adjustment method in the embodiment shown in FIG. 1.
- the device mainly includes an opening module 201, an intersection calculation module 202, and an image movement module 203, among which:
- the opening module 201 is used to turn on the camera of the scanned terminal when the scanned terminal presents the pattern code
- the intersection calculation module 202 is used to calculate the intersection area between the window of the scanning device and the screen of the scanning terminal when the camera of the scanning terminal detects that a scanning device appears in front;
- the image moving module 203 is configured to move the pattern code to the range of the intersection area if the pattern code displayed on the terminal being scanned is not completely within the range of the intersection area.
- each functional module is only an example. In actual applications, the configuration requirements of the corresponding hardware or the convenience of the implementation of the software can be considered according to the needs.
- Function allocation is completed by different functional modules, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above.
- the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software.
- the various embodiments provided in this specification can all apply the above described principles, which will not be repeated hereafter.
- the pattern code position adjustment device in this embodiment of the application can move the pattern code displayed on the scanned code terminal to the intersection area between the window of the scanning device and the screen of the terminal being scanned.
- the scanning device can still be scanned by the scanning device.
- the pattern code displayed on the code terminal correctly recognizes the pattern code, thereby eliminating user obstacles and improving the scanning efficiency of pattern codes in large-scale use of pattern codes.
- the intersection calculation module 202 is specifically configured to extract characteristic information of the scanning device; determine the current scanning device according to the extracted characteristic information of the scanning device; compare the image captured by the scanning terminal with the current scanning device Compare the full picture of the device to determine the window range captured by the terminal to be scanned; the screen area of the terminal to be scanned overlaps the window range, and the overlapping part is determined as the window of the scanning device and the screen of the terminal to be scanned The intersection area.
- the intersection calculation module 202 is specifically configured to take a picture of the scanning device in front of the terminal to be scanned to obtain a picture containing a window; determine the boundary of the window in the picture containing the window; determine that the picture containing the window is The edge of the screen of the scanning terminal determines the convex polygonal area enclosed by all the borders of the window or the convex polygonal area enclosed by the border of the scanning terminal's screen and the border of the window in the picture containing the window as the intersection area.
- the intersection calculation module 202 is specifically configured to use any two intersecting edge lines of the screen of the terminal to be scanned as the vertical axis and the horizontal axis, and use the intersection of the two edge lines as the origin to construct a coordinate system; and record;
- the projection of the window of the scanning device on the plane of the coordinate system respectively find the pixel point P1x closest to the horizontal axis and the pixel point P1y closest to the vertical axis in the projection, or the pixel point P2x closest to the horizontal axis and the farthest from the horizontal axis Pixel point P3x and pixel point P2y closest to the vertical axis, or pixel point P3y closest to the vertical axis, pixel point P4y farthest from the vertical axis, and pixel point P4x farthest from the horizontal axis, or closest to the horizontal axis Pixel point P5x, pixel point P5y closest to the vertical axis, pixel point P6x farthest from the horizontal axis,
- the image moving module 203 is specifically configured to directly translate the pattern code within the range of the intersection area.
- the image moving module 203 is specifically configured to reduce the pattern code, and translate the reduced pattern code to the range of the intersection area.
- the image moving module 203 is specifically configured to shrink the screen of the scanned terminal, and translate the reduced screen to the intersection area, so that the pattern code on the screen is within the range of the intersection area.
- the image movement module 203 is specifically configured to reduce the pattern code to the minimum recognition size that can be recognized, and display the pattern code of the minimum recognition size and multiple copies thereof on the screen of the scanned code terminal so that the minimum recognition size is The pattern code or at least one copy thereof is displayed in the intersection area.
- FIG. 3 provides an electronic device according to an embodiment of the application.
- the electronic device can be used to implement the pattern code position adjustment method in the embodiment shown in FIG. 1.
- the electronic device mainly includes:
- the electronic device further includes:
- At least one input device 303 and at least one output device 304 At least one input device 303 and at least one output device 304.
- the aforementioned memory 301, processor 302, input device 303, and output device 304 are connected via a bus 305.
- the input device 303 may specifically be a camera, a touch panel, a physical button or a mouse, etc.
- the output device 304 may specifically be a display screen.
- the memory 301 may be a high-speed random access memory (RAM, Random Access Memory) memory can also be non-volatile memory (non-volatile memory), such as disk storage.
- RAM Random Access Memory
- non-volatile memory such as disk storage.
- the memory 301 is configured to store a set of executable readable instruction codes, and the processor 302 is coupled with the memory 301.
- the device in the embodiment of the present application after calculating the intersection area between the window of the scanning device and the screen of the terminal being scanned, can move the pattern code displayed on the terminal being scanned to the range of the intersection area Therefore, even if the pattern code does not fall within the scope of the window due to the user’s back to the screen and “blind pairing” with the window of the scanning device, the scanning device can also be scanned and displayed on the scanned terminal
- the pattern code can correctly identify the pattern code, thereby eliminating the user's obstacles to use, and also enables the scanning efficiency of the pattern code to be improved when the pattern code is used on a large scale.
- the embodiments of the present application also provide a computer-readable storage medium.
- the computer-readable storage medium may be provided in the electronic device in each of the foregoing embodiments, and the computer-readable storage medium may be the one shown in FIG.
- the memory in the embodiment is shown.
- the computer-readable storage medium stores computer-readable instructions, which when executed by the processor, implement the pattern code position adjustment method in the embodiment shown in FIG. 1.
- the computer storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), RAM, magnetic disks or optical disks and other media that can store readable instruction codes.
- the disclosed device and method may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the modules is only a logical function division, and there may be other divisions in actual implementation, for example, multiple modules or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or modules, and may be in electrical, mechanical or other forms.
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
- the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the medium includes a number of instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned readable storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk, or optical disk and other media that can store readable instruction codes.
- the computer readable storage medium may be a non-volatile readable storage medium. .
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
Claims (20)
- 一种图案码位置调整方法,应用于电子装置,其特征在于,所述方法包括:在被扫码终端呈现图案码时,开启被扫码终端的摄像头;当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域;若被扫码终端上呈现的图案码不完全在交汇区域范围内,则将所述图案码移至交汇区域的范围之内。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:提取所述扫码设备的特征信息;根据所述提取的扫码设备的特征信息,确定当前扫码设备;将所述被扫码终端所拍摄到的图像与所述当前扫码设备的全图对比,确定所述被扫码终端所拍摄到的视窗范围;将所述被扫码终端的屏幕区域与所述视窗范围重叠,所述重叠的部分确定为所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:对所述被扫码终端前方的扫码设备进行拍摄,得到一张包含视窗的图片;确定所述包含视窗的图片中视窗的边界;确定所述包含视窗的图片中被扫码终端的屏幕的边界;将所述视窗的全部边界围成的凸多边形区域或者所述包含视窗的图片中被扫码终端的屏幕的边界与所述视窗的边界围成的凸多边形区域确定为交汇区域。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:以所述被扫码终端的屏幕的任意两条交叉的边缘线作为纵轴和横轴,并以两条边缘线的交叉点作为原点构建坐标系;记录所述扫码设备的视窗在坐标系平面的投影;分别求取投影中距离横轴最近的像素点P1x和距离纵轴最近的像素点P1y,或者距离横轴最近的像素点P2x、距离横轴最远的像素点P3x以及距离纵轴最近的像素点P2y,或者距离纵轴最近的像素点P3y、距离纵轴最远的像素点P4y以及距离横轴最远的像素点P4x,或者距离横轴最近的像素点P5x、距离纵轴最近的像素点P5y、距离横轴最远的像素点P6x以及距离纵轴最远的像素点P6y;确定经过像素点P1x和像素点P1y为视窗的边界E1和E2,或者确定经过P2x、像素点P3x以及像素点P2y为视窗的边界E3、E4和E5,或者确定经过像素点P3y、像素点P4y以及像素点P4x为视窗的边界E6、E7和E8,或者确定经过像素点P5x、像素点P5y、像素点P6x以及像素点P6y为视窗的边界E9、E10、E11和E12;将所述视窗的边界E1和E2与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E3、E4和E5与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E6、E7和E8与所述被扫码终端的屏幕的边界围成的凸多边形,或者将视窗的边界E9、E10、E11和E12围成的凸多边形确定为交汇区域。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述将图案码移至交汇区域的范围之内,包括:直接将所述图案码平移至所述交汇区域的范围之内。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述将图案码移至交汇区域的范围之内,包括:缩小所述图案码;将所述缩小的图案码平移至所述交汇区域的范围之内。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述将图案码移至交汇区域的范围之内,包括:缩小所述被扫码终端的屏幕缩小;将所述缩小的屏幕向所述交汇区域平移,使得屏幕上的图案码在交汇区域的范围之内。
- 根据权利要求1所述的图案码位置调整方法,其特征在于,所述将图案码移至交汇区域的范围之内,包括:将图案码缩小至能够被识别的最小识别尺寸;将所述最小识别尺寸的图案码及其多个副本显示在所述被扫码终端的屏幕,以便所述最小识别尺寸的图案码或其至少一个副本显示在所述交汇区域。
- 一种电子装置,其特征在于,该电子装置包括:存储器、处理器及总线,所述存储器中包括图案码位置调整可读指令,所述图案码位置调整可读指令被所述处理器执行时,调用开启模块、交汇区计算模块和图像移动模块实现如以下步骤:开启模块,用于在被扫码终端呈现图案码时,开启被扫码终端的摄像头;交汇区计算模块,用于当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域;图像移动模块,用于若被扫码终端上呈现的图案码不完全在交汇区域范围内,则将所述图案码移至交汇区域的范围之内。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用交汇区计算模块执行以下步骤:提取所述扫码设备的特征信息;根据所述提取的扫码设备的特征信息,确定当前扫码设备;将所述被扫码终端所拍摄到的图像与所述当前扫码设备的全图对比,确定所述被扫码终端所拍摄到的视窗范围;将所述被扫码终端的屏幕区域与所述视窗范围重叠,所述重叠的部分确定为所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用交汇区计算模块执行以下步骤:对所述被扫码终端前方的扫码设备进行拍摄,得到一张包含视窗的图片;确定所述包含视窗的图片中视窗的边界;确定所述包含视窗的图片中被扫码终端的屏幕的边界;将所述视窗的全部边界围成的凸多边形区域或者所述包含视窗的图片中被扫码终端的屏幕的边界与所述视窗的边界围成的凸多边形区域确定为交汇区域。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用交汇区计算模块执行以下步骤:以所述被扫码终端的屏幕的任意两条交叉的边缘线作为纵轴和横轴,并以两条边缘线的交叉点作为原点构建坐标系;记录所述扫码设备的视窗在坐标系平面的投影;分别求取投影中距离横轴最近的像素点P1x和距离纵轴最近的像素点P1y,或者距离横轴最近的像素点P2x、距离横轴最远的像素点P3x以及距离纵轴最近的像素点P2y,或者距离纵轴最近的像素点P3y、距离纵轴最远的像素点P4y以及距离横轴最远的像素点P4x,或者距离横轴最近的像素点P5x、距离纵轴最近的像素点P5y、距离横轴最远的像素点P6x以及距离纵轴最远的像素点P6y;确定经过像素点P1x和像素点P1y为视窗的边界E1和E2,或者确定经过P2x、像素点P3x以及像素点P2y为视窗的边界E3、E4和E5,或者确定经过像素点P3y、像素点P4y以及像素点P4x为视窗的边界E6、E7和E8,或者确定经过像素点P5x、像素点P5y、像素点P6x以及像素点P6y为视窗的边界E9、E10、E11和E12;将所述视窗的边界E1和E2与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E3、E4和E5与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E6、E7和E8与所述被扫码终端的屏幕的边界围成的凸多边形,或者将视窗的边界E9、E10、E11和E12围成的凸多边形确定为交汇区域。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用图像移动模块,执行以步骤:直接将所述图案码平移至所述交汇区域的范围之内。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用图像移动模块,执行以步骤:缩小所述图案码;将所述缩小的图案码平移至所述交汇区域的范围之内。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用图像移动模块,执行以步骤:缩小所述被扫码终端的屏幕缩小;将所述缩小的屏幕向所述交汇区域平移,使得屏幕上的图案码在交汇区域的范围之内。
- 根据权利要求9所述的电子装置,其特征在于,所述图案码位置调整可读指令被所述处理器执行时调用图像移动模块,执行以步骤:将图案码缩小至能够被识别的最小识别尺寸;将所述最小识别尺寸的图案码及其多个副本显示在所述被扫码终端的屏幕,以便所述最小识别尺寸的图案码或其至少一个副本显示在所述交汇区域。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括图案码位置调整可读指令,所述图案码位置调整可读指令被处理器执行时,实现如权利以下步骤:在被扫码终端呈现图案码时,开启被扫码终端的摄像头;当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域;若被扫码终端上呈现的图案码不完全在交汇区域范围内,则将所述图案码移至交汇区域的范围之内。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述图案码位置调整可读指令被所述处理器执行所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:提取所述扫码设备的特征信息;根据所述提取的扫码设备的特征信息,确定当前扫码设备;将所述被扫码终端所拍摄到的图像与所述当前扫码设备的全图对比,确定所述被扫码终端所拍摄到的视窗范围;将所述被扫码终端的屏幕区域与所述视窗范围重叠,所述重叠的部分确定为所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述图案码位置调整可读指令被所述处理器执行所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:对所述被扫码终端前方的扫码设备进行拍摄,得到一张包含视窗的图片;确定所述包含视窗的图片中视窗的边界;确定所述包含视窗的图片中被扫码终端的屏幕的边界;将所述视窗的全部边界围成的凸多边形区域或者所述包含视窗的图片中被扫码终端的屏幕的边界与所述视窗的边界围成的凸多边形区域确定为交汇区域。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述图案码位置调整可读指令被所述处理器执行所述当所述被扫码终端的摄像头监测到前方出现扫码设备,则计算所述扫码设备的视窗与所述被扫码终端的屏幕的交汇区域,包括:以所述被扫码终端的屏幕的任意两条交叉的边缘线作为纵轴和横轴,并以两条边缘线的交叉点作为原点构建坐标系;记录所述扫码设备的视窗在坐标系平面的投影;分别求取投影中距离横轴最近的像素点P1x和距离纵轴最近的像素点P1y,或者距离横轴最近的像素点P2x、距离横轴最远的像素点P3x以及距离纵轴最近的像素点P2y,或者距离纵轴最近的像素点P3y、距离纵轴最远的像素点P4y以及距离横轴最远的像素点P4x,或者距离横轴最近的像素点P5x、距离纵轴最近的像素点P5y、距离横轴最远的像素点P6x以及距离纵轴最远的像素点P6y;确定经过像素点P1x和像素点P1y为视窗的边界E1和E2,或者确定经过P2x、像素点P3x以及像素点P2y为视窗的边界E3、E4和E5,或者确定经过像素点P3y、像素点P4y以及像素点P4x为视窗的边界E6、E7和E8,或者确定经过像素点P5x、像素点P5y、像素点P6x以及像素点P6y为视窗的边界E9、E10、E11和E12;将所述视窗的边界E1和E2与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E3、E4和E5与所述被扫码终端的屏幕的边界围成的凸多边形,或者将所述视窗的边界E6、E7和E8与所述被扫码终端的屏幕的边界围成的凸多边形,或者将视窗的边界E9、E10、E11和E12围成的凸多边形确定为交汇区域。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910374207.8A CN110197457B (zh) | 2019-05-07 | 2019-05-07 | 图案码位置调整方法、装置及计算机可读存储介质 |
CN201910374207.8 | 2019-05-07 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020224089A1 true WO2020224089A1 (zh) | 2020-11-12 |
Family
ID=67752380
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/101894 WO2020224089A1 (zh) | 2019-05-07 | 2019-08-22 | 图案码位置调整方法、装置及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110197457B (zh) |
WO (1) | WO2020224089A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110717750A (zh) * | 2019-09-18 | 2020-01-21 | 平安科技(深圳)有限公司 | 一种二维码显示方法、二维码显示装置及移动终端 |
CN111126096A (zh) * | 2019-12-06 | 2020-05-08 | 支付宝(杭州)信息技术有限公司 | 二维码尺寸确定方法、二维码显示方法、装置及设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107609442A (zh) * | 2017-09-01 | 2018-01-19 | 深圳天珑无线科技有限公司 | 扫码方法、移动终端及计算机可读存储介质 |
CN107886020A (zh) * | 2017-10-17 | 2018-04-06 | 北京三快在线科技有限公司 | 一种扫码的方法和装置 |
CN109409164A (zh) * | 2018-11-20 | 2019-03-01 | 普联技术有限公司 | 扫描图像显示调整方法、装置及电子设备 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9424570B2 (en) * | 2014-08-13 | 2016-08-23 | Paypal, Inc. | On-screen code stabilization |
CN106557798A (zh) * | 2015-09-24 | 2017-04-05 | 沈维 | 一种复合标志及形成所述复合标志的方法 |
CN107944325B (zh) * | 2017-11-23 | 2020-01-03 | 维沃移动通信有限公司 | 一种扫码方法、扫码装置及移动终端 |
CN207557953U (zh) * | 2017-11-30 | 2018-06-29 | 北京意锐新创科技有限公司 | 一种多功能扫码视窗及多功能条码扫描识别仪 |
CN109407940A (zh) * | 2018-10-12 | 2019-03-01 | 无锡天脉聚源传媒科技有限公司 | 一种目标对象选中方法、系统、终端及存储介质 |
-
2019
- 2019-05-07 CN CN201910374207.8A patent/CN110197457B/zh active Active
- 2019-08-22 WO PCT/CN2019/101894 patent/WO2020224089A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107609442A (zh) * | 2017-09-01 | 2018-01-19 | 深圳天珑无线科技有限公司 | 扫码方法、移动终端及计算机可读存储介质 |
CN107886020A (zh) * | 2017-10-17 | 2018-04-06 | 北京三快在线科技有限公司 | 一种扫码的方法和装置 |
CN109409164A (zh) * | 2018-11-20 | 2019-03-01 | 普联技术有限公司 | 扫描图像显示调整方法、装置及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN110197457B (zh) | 2024-04-09 |
CN110197457A (zh) | 2019-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017119664A1 (en) | Display apparatus and control methods thereof | |
WO2016085234A1 (en) | Method and device for amending handwritten characters | |
WO2018182192A1 (en) | Method and apparatus for displaying image based on user motion information | |
WO2019107981A1 (en) | Electronic device recognizing text in image | |
WO2018201638A1 (zh) | 基于图像识别的信息采集方法、移动终端及存储介质 | |
WO2015016619A1 (en) | Electronic apparatus, method of controlling the same, and image reproducing apparatus and method | |
WO2015137666A1 (ko) | 오브젝트 인식 장치 및 그 제어 방법 | |
WO2020101420A1 (ko) | 증강현실 기기의 광학 특성 측정 방법 및 장치 | |
WO2018093100A1 (en) | Electronic apparatus and method for processing image thereof | |
WO2019039739A1 (en) | DISPLAY APPARATUS AND METHOD FOR CONTROLLING THE SAME | |
WO2020141900A1 (ko) | 이동 로봇 및 그 구동 방법 | |
WO2020224089A1 (zh) | 图案码位置调整方法、装置及计算机可读存储介质 | |
WO2019143050A1 (en) | Electronic device and method for controlling autofocus of camera | |
WO2016126083A1 (ko) | 주변 상황 정보를 통지하기 위한 방법, 전자 장치 및 저장 매체 | |
WO2020171333A1 (ko) | 이미지 내의 오브젝트 선택에 대응하는 서비스를 제공하기 위한 전자 장치 및 방법 | |
WO2021025509A1 (en) | Apparatus and method for displaying graphic elements according to object | |
WO2019160260A1 (ko) | 전자 장치 및 그 동작 방법 | |
WO2016080653A1 (en) | Method and apparatus for image processing | |
WO2020062615A1 (zh) | 显示面板的伽马值调节方法、装置及显示设备 | |
WO2021132743A1 (ko) | 애플리케이션과 관련된 컨텐츠를 표시하는 전자 장치 및 그 제어 방법 | |
WO2020171342A1 (ko) | 외부 객체의 정보에 기반하여 시각화된 인공 지능 서비스를 제공하는 전자 장치 및 전자 장치의 동작 방법 | |
WO2019194423A1 (en) | Electronic apparatus and operating method thereof | |
WO2020171558A1 (en) | Method of providing augmented reality contents and electronic device therefor | |
WO2014178578A1 (en) | Apparatus and method for generating image data in portable terminal | |
WO2020091182A1 (ko) | 증강 현실을 이용한 영상 데이터를 제공하는 전자 장치 및 그 제어 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19927930 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19927930 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.06.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19927930 Country of ref document: EP Kind code of ref document: A1 |