QR (Quick-Response) code is a widely used two-dimensional code with fast decoding speed.

This article refers to the address: http://

It can store multipurpose types

8.jpg

As shown above, the basic structure of a qrcode, where:

Position detection pattern, position detection pattern separator, positioning pattern: used to locate the QR code. For each QR code, the position is fixed, but the size specifications will be different;

Correction pattern: the specification is determined, and the number and position of the correction pattern are determined;

Format information: indicates the error correction level of the modified QR code, which is divided into L, M, Q, and H;

Version information: the specification of the QR code. The QR code symbol has a matrix of 40 specifications (usually black and white), from 21x21 (version 1) to 177x177 (version 40). Each version symbol is more than the previous version. Add 4 modules.

Data and error correction codewords: Actually stored QR code information, and error correction codewords (used to correct errors caused by QR code corruption).

Brief coding process:

1. Data analysis: Determine the type of the encoded character and convert it into symbol characters according to the corresponding character set. Select the error correction level. Under the condition of certain specifications, the higher the error correction level, the smaller the capacity of the real data.

2. Data coding: Convert data characters into bit streams, one codeword every 8 bits, and form a sequence of code words of one data as a whole. In fact, knowing the data code word sequence knows the data content of the QR code.

Detailed description of the two-dimensional code encoding principle

Data can be encoded in a pattern for more efficient decoding, such as encoding data (version 1-H),

1) Grouping: 012 345 67

2) Convert to binary: 012 → 0000001100

345→0101011001

67 →1000011

3) Convert to sequence

4) Convert the number of characters into binary: 8→0000001000

5) Join mode indicator (number above) 0001 0101011001 1000011

For letters, Chinese, Japanese, etc., only the grouping methods, modes, and the like are different. The basic method is consistent

3. Error correction coding: block the above codeword sequence as needed, and generate an error correction codeword according to the error correction level and the block codeword, and add the error correction codeword to the data codeword sequence to become A new sequence.

10.jpg

In the case where the two-dimensional code specification and the error correction level are determined, the total number of codewords and the number of error correction code words that can be accommodated therein are also determined, for example, version 10, when the error correction level is H, a total of 346 can be accommodated. Codeword, of which 224 error correction codewords.

That is to say, about 1/3 of the code words in the two-dimensional code area are redundant. For these 224 error correction codewords, it can correct 112 alternative errors (such as black and white upside down) or 224 read errors (unreadable or undecodeable).

The error correction capacity is: 112/346 = 32.4%

4. Construct the final data information: in the condition that the specification is determined, put the sequence generated above into the block in order.

The data is divided into blocks according to regulations, and then each block is calculated to obtain a corresponding error correction codeword block, and the error correction codeword block is sequentially formed into a sequence, which is added to the original data codeword sequence.

Such as: D1, D12, D23, D35, D2, D13, D24, D36, ... D11, D22, D33, D45, D34, D46, E1, E23, E45, E67, E2, E24, E46, E68,. ..

5. Construct Matrix: Place the probing pattern, separator, positioning graph, correction graph, and codeword module into the matrix.

11.jpg

Fill the complete sequence above into the area of ​​the QR code matrix of the corresponding specification

6. Masking: The masking pattern is used for the coding region of the symbol so that the dark and light (black and white) regions in the two-dimensional code pattern can be optimally distributed.

An algorithm, not studied, interested students can continue.

7. Format and version information: Generate format and version information into the corresponding area.

Versions 7-40 contain version information, and all versions without version information are 0. The two locations on the QR code contain version information, which are redundant.

The version information has a total of 18 bits, 6×3 matrix, of which the data is 6 bits, such as version number 8, the data bit information is 001000, and the last 12 bits are error correction bits.

At this point, the encoding process of the QR code is basically completed. Let's practice it below. Of course, you don't have to write the above algorithm yourself. You can use the three-party package zxing.

coding:
Public static void encode(String content, String format, String filePath) {
Try {
Hashtable hints = new Hashtable();//Set the encoding type
Hints.put(EncodeHintType.CHARACTER_SET, DEFAULT_ENCODING);
//Code BitMatrix bitMatrix = new QRCodeWriter().encode(content,
BarcodeFormat.QR_CODE, DEFAULT_IMAGE_WIDTH,
DEFAULT_IMAGE_HEIGHT, hints);
/ / Output to a file, can also be output to the stream
File file = new File(filePath);
MatrixToImageWriter.writeToFile(bitMatrix, format, file);

} catch (IOException e) {
e.printStackTrace();
} catch (WriterException e1) {
e1.printStackTrace();
}
}

decoding:

BufferedImage image = ImageIO.read(file);//Read file
LuminanceSource source = new BufferedImageLuminanceSource(image);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(
Source));
//decoding
Result result = new MultiFormatReader().decode(bitmap);
String resultStr = result.getText();
System.out.println(resultStr);

The new product line is the characteristic product of our company's production and development, mainly including the Anti-corrosive Aluminum alloy spinning lamp pole,Solar Camera light,Cylindrical Intelligent Street Lamp,No power LED Module .

Anti-corrosive Aluminum alloy spinning lamp pole Solar camera light

Cylindrical Intelligent street lampNo power LED module

1.Aluminum alloy spinning lamp pole

The spinning pole is the use of foreign advanced spinning equipment,forming a whole without welding,forming a conical or profiled bar.And then polishing,remove surface oil,burr and indentation.Then after the quenching intensity,to T6 state,in line with international standards.The product never rust ,strong corrosion resistance,diversified surface treatment process,the appearance of simple fluid lines.Light weight and convenient installation and transportation,the rod body can be 100%recycling,low melting temperature.

Product features

â‘ Using spinning equipment advanced,the whole forming a non welding

â‘¡Product permanent does not rust,corrosion resistance

â‘¢Diversified surface treatment technology,make the appearance line succinct smooth

â‘£The light weight,convenient installation and transportation

⑤The rod body can be 100% recycling,melting temperature is low.

Aluminum alloy spinning lamp pole

2.Camera street light






The camera street light is used to use the infrared network high definition intelligent ball's various features so that it can be widely used in the need of large-scale hd quality control of the site.

Functional properties

â‘ Smart Function:Smart Tracing,Smart Inspecting,Smart Road Monitor

â‘¡System Function:Smart Video,Smart Photo Enhancement

â‘¢Movement Function

â‘£Network Function

Camera street light

3.Intelligent Street Lamp 


Intelligent Street Lamps are also called intelligent lighting or smart street lights.It adopts the Internet of things and cloud computing technology to comprehensively upgrade the urban public lighting management system, so as to realize centralized control, operation and maintenance information and intelligent lighting of street lamps.The most advanced versions of Intelligent Street Lamps have been designed to create a happy atmosphere in roads, streets, squares and other places.The design of intelligent street lamps can only be designed by a wide range of discussions and environments that provide an aesthetic consistency.

Product feature

1.Sensor

Monitoring urban environment conditions

Sensor norise

Air pollution sensor

Temperature/humidity sensor

Brightness sensor

Municipal construction monitor

2.RFID

Special crowed monitor

CMC monitor

Community security monitor

Municipal facilities monitor

3.Communication Services

Micro base station

Street lights embedded WIFI hot spot

4.Video Monitor

Security monitor

Vehicle monitor

5.Emergency Broadcast

Active of the external field radio monitoring center

6.Intelligent Lighting

Cellular cooling technology

Based on the luminance uniformity of light distribution

Intelligent single lamp/center controller

Variety of modular design lamp,holder is optional.

7.Information Release

Advertising exposure

Current politics news

Information release

8.Charging Column

Electric car

Electric bicycle

Intelligent street lamp


4. Led Module

● The unique acicular radiator,360 degree dissipation small wind resistance. High heat dissipation efficiency ensuring that the LED chip can work for 50000 hours.

● Color temperature 3000-6000K

● Light≥90LM/W

● Matching the 2.3.4 lane,tunnel and Landscape Lamp,floodlight dedicated lens.Ensure that intensity and uniformity.

● Glare index Signification reduce the original LED module size,removal of power supply problems.Low demands for application situation and installation personnel .More suitable for the transformation of traditional lamps.


Product features

â‘ The solid heat conduction,Plug-in package technology

â‘¡Alternating current method,Alternating current direct drive to overturn the traditional application.

â‘¢Avoid long-distance power.Transfer will have excess loss.

â‘£No power supply ACLED

⑤Customized LED lens

â‘¥Automatic dimming system intelligent.

⑦Wide application,flexible combination.









New Products Lighting Series

Aluminum Alloy Spinning Lighting Pole,Lightest Aluminum Alloy,Aluminum Alloy Torchlight,Lightweight Aluminum Alloy

Jiangsu chengxu Electric Group Co., Ltd , http://www.chengxulighting.com