Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for beautifying three-dimensional code according to image color

A three-dimensional code and color technology, applied in the field of three-dimensional codes, can solve the problems of missing color information and poor visual effects of three-dimensional codes

Pending Publication Date: 2022-05-31
CN3WM XIAMEN NETWORK TECH CO LTD
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The invention adjusts the color of the background picture according to the color of the two-dimensional code. Although the reading performance of the three-dimensional code is guaranteed to a certain extent, the obtained three-dimensional code loses the color information and the visual effect is poor.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for beautifying three-dimensional code according to image color
  • Method for beautifying three-dimensional code according to image color
  • Method for beautifying three-dimensional code according to image color

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0048] input background image;

[0049] Select the raw code area on the background image, and the number of pixels on the side of the raw code area is PX2;

[0050] Obtain the coding information I, generate a code point matrix according to the coding information I, the dark code point in the code point matrix represents 1, and the light-colored code point represents 0; the width of the code point matrix is ​​W, and the side length pixel of each code point is calculated according to the following formula number;

[0051] mul=PX2 / W

[0052] Calculate the brightness value of each pixel in the raw code area, the formula is as follows:

[0053] L i =0.299*R i+0.587*G i +0.114*B i

[0054] In the formula, L i Indicates the brightness value of the pixel; R i Represents the R component in the pixel's RGB value; G i Represents the G component in the RGB value of the pixel; B i Represents the B component in the pixel's RGB value.

[0055] Calculate the neighborhood average b...

Embodiment 3

[0066] The difference between this embodiment and the second embodiment is that: after the maximum brightness value and the minimum brightness value in the generated code area are obtained by statistics, the RGB values ​​(RGB values ​​of the pixels corresponding to the maximum brightness value and the minimum brightness value) are stored. Lmax , RGB Lmin ). And set the target color value of the dark code point to RGB Lmax , the target color value of the light-color code point is RGB Lmin . When the background image has obvious bright and dark colors, the code point color is the light color and dark color of the background image, and the code point is colored and integrated into the background image.

[0067] This embodiment is based on the global binarization in the principle of 3D code reading (that is, a fixed threshold brightness is set for the whole image, the pixels with brightness greater than this threshold are regarded as white pixels, and the pixels with brightness...

Embodiment 4

[0069] Input the background picture P1; the background picture P1 such as figure 2 As shown, the side length is 800 pixels.

[0070] Select the code generation area P2 on the background picture P1; the code generation area P2 is as follows image 3 As shown, the side length of the code generation area P2 is 800 pixels. The width of the matrix is ​​33, and the number of pixels mul on the side length is 27.

[0071] After calculation and search, the maximum brightness value L in the raw code area P2 is obtained max =255, the minimum brightness value L min =65. Calculate the target luminance value L of each code point according to the formula described in Embodiment 2 target , the target brightness value L target That is, the target RGB value for this code point. Superimpose the code point matrix in the raw code area according to the target RGB value of the code point to obtain a three-dimensional code, such as Figure 4 shown.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for beautifying a three-dimensional code according to an image color. The method comprises the steps of obtaining a background picture; selecting a code generating area on the background picture; counting the maximum brightness value and the minimum brightness value of pixels in the code generating area; determining a target brightness value of each code point according to the maximum brightness value and the minimum brightness value; determining a target color value of the code point according to the target brightness value of the code point; and according to the target color value of each code point, generating a code point matrix in the code generation area to obtain the three-dimensional code.

Description

technical field [0001] The invention relates to a method for beautifying a three-dimensional code according to image color, and belongs to the field of three-dimensional code. Background technique [0002] A two-dimensional code is a symbol that uses black and white graphics to represent information in both the horizontal and vertical directions of the plane. By fusing the two-dimensional code with the background picture, a three-dimensional code can be obtained (refer to the patent "Three-dimensional Code Generation Method" with publication number CN106991462A). The background image may be a corporate logo, a trademark logo, a product logo, a human face, an application scene, or the like. In addition to providing corresponding data information, 3D codes can also provide visual information. However, the code point and the background image will inevitably affect each other. In the existing 3D code generation method, the fusion effect of the code point and the background ima...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06T5/00G06K19/06
CPCG06K19/06037G06T5/94
Inventor 陈绳旭马吉良张梦达王秋婉
Owner CN3WM XIAMEN NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products