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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com