CN111814790A - Two-dimensional image identification method for automatic identification of aquaculture net cage - Google Patents

Two-dimensional image identification method for automatic identification of aquaculture net cage Download PDF

Info

Publication number
CN111814790A
CN111814790A CN202010686835.2A CN202010686835A CN111814790A CN 111814790 A CN111814790 A CN 111814790A CN 202010686835 A CN202010686835 A CN 202010686835A CN 111814790 A CN111814790 A CN 111814790A
Authority
CN
China
Prior art keywords
bits
color
bit
area
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010686835.2A
Other languages
Chinese (zh)
Other versions
CN111814790B (en
Inventor
彭树林
师泰龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Advanced Avionics Co ltd
Original Assignee
Shanghai Advanced Avionics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Advanced Avionics Co ltd filed Critical Shanghai Advanced Avionics Co ltd
Priority to CN202010686835.2A priority Critical patent/CN111814790B/en
Publication of CN111814790A publication Critical patent/CN111814790A/en
Application granted granted Critical
Publication of CN111814790B publication Critical patent/CN111814790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/11Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits using multiple parity bits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/80Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
    • Y02A40/81Aquaculture, e.g. of fish

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a two-dimensional image identification method for automatically identifying a culture net cage, which comprises the following steps of: s1: dividing a two-dimensional image space into X multiplied by Y parts at equal intervals along X and Y directions under a rectangular coordinate system to form X multiplied by Y color blocks, and confirming the color value range of the color blocks; s2: dividing all color blocks into three functional areas, wherein the first area is used for positioning and correcting a two-dimensional image; the second area encodes the machine identification information; the third area simultaneously performs coding of machine identification information and printing of human eye identification characters; s3: determining the color definition of each color block in the first area; determining the coding rule and the color definition of each color block in the second area; determining the coding rule and the color definition of each color block in the third area; s4: and identifying the two-dimensional image according to the coding rule and the color definition of the color blocks. The invention can reliably identify the fouling rate of the soil under the condition that the fouling rate reaches 60 percent.

Description

Two-dimensional image identification method for automatic identification of aquaculture net cage
Technical Field
The invention relates to a two-dimensional image identification method, in particular to a two-dimensional image identification method for automatic identification of a culture net cage.
Background
In order to effectively perform fishery breeding management, breeding enterprises or farmers have visually identified breeding cages, including writing numbers with paint. These conventional identification methods are difficult to identify by human eyes and have a low success probability of automatic machine vision recognition due to biological attachment, which is not favorable for automatic cultivation management.
The existing two-dimensional code can also be used for identification of net cages, but the highest level can only reach 30% (L level: 7%, M level: 15%, Q level: 25%, H level: 30%) due to the error correction capability of the existing two-dimensional code, and the method cannot meet the requirement of automatic identification of mariculture (fouling caused by biological attachment is more than 50%).
Therefore, the existing encoding method still needs to be improved.
Disclosure of Invention
The invention aims to provide a two-dimensional image identification method for automatically identifying a culture net cage, which can reliably identify the culture net cage under the condition that the fouling reaches 60%.
The invention adopts the technical scheme to solve the technical problems and provides a two-dimensional image identification method for automatically identifying a culture net cage, which comprises the following steps: s1: dividing a two-dimensional image space into X parts at equal intervals along the X direction and Y parts at equal intervals along the Y direction under a rectangular coordinate system to form X multiplied by Y color blocks, and determining the color value range of the color blocks; s2: dividing all color blocks into three functional areas, wherein the first area is used for positioning and correcting a two-dimensional image; the second area encodes the machine identification information; the third area simultaneously performs coding of machine identification information and printing of human eye identification characters; s3: determining the color definition of each color block of the first area according to the area classification of the step S2; determining the coding rule and the color definition of each color block in the second area; determining the coding rule and the color definition of each color block in the third area; s4: and according to the coding rule and the color definition of the color blocks of each region in the step S3, marking the two-dimensional image to form a two-dimensional coded image.
Further, in the step S1, the value of X is 19, the value of Y is 17, and the two-dimensional image is divided into 323 color blocks; the color value range of the color block comprises a blank color block, a red color block and a green color block, wherein the blank color block is the color block of any color except the red color block and the green color block.
Further, the step S2 specifically includes: s21: dividing a first area, wherein the first area comprises a 2 multiplied by 2 color block field character pattern at four corners of the two-dimensional image, a 3 multiplied by 2 color block rectangular pattern between two field character patterns at the top and the bottom, a four-color block T-shaped pattern between two field character patterns at the left side and the right side, and a 3 multiplied by 3 color block square pattern at the center of the two-dimensional image; s22: dividing a second area, wherein the second area comprises a rectangular graph of 6 multiplied by 1 color blocks which transversely connect all parts of the first area and a rectangular graph of 1 multiplied by 5 color blocks which longitudinally connect all parts of the first area; s23: and dividing a third area, wherein color blocks except the first area and the second area in the two-dimensional image are the third area, the first area and the second area divide the third area into four parts, a rectangular graph of a 5 multiplied by 7 color block on the right side of each part is a printing block for identifying characters by human eyes, and other color blocks of each part are coding blocks of machine identification information.
Further, the step S3 specifically includes: s31: defining color block colors of a first area, defining a color block connecting the four corner field patterns and a third area as a blank color block, and defining the other three color blocks as red color blocks; defining three color blocks, which are connected with a rectangular graph between the top and bottom two field graphs and the second area, as red color blocks, and defining the other three color blocks as empty color blocks; defining three color blocks, which are connected with a T-shaped graph in the middle of the two left and right field graphs and the second area, as red color blocks, and defining the other color block as a blank color block; four color blocks connecting the square graph in the center of the two-dimensional image and the second area are defined as red color blocks, and the other five color blocks are defined as empty color blocks; s32: defining color block coding and color of a second area, respectively representing 66 color blocks of the second area by B1-B66, corresponding to 66 bits, using the 66 bits for coding 16 bits of information, wherein the 16 bits of information represent 1 16-bit character or 2 8-bit characters, 1 16-bit character is used for representing a Chinese character, and 2 8-bit characters are used for representing two ASCII code characters; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; the color blocks in the second area are printed and coded by adopting green color blocks and empty color blocks, wherein the green color blocks represent binary '1', and the empty color blocks represent binary '0'; second regionThe encoding of the domain color block is used for distinguishing the breeding enterprises or different breeding platforms of the breeding enterprises; s33: defining color block codes and colors of a third area, wherein each part of the third area comprises character printing blocks of 35 color blocks and information coding blocks of 18 color blocks, and the character printing blocks are used for printing characters of a 5 multiplied by 7 dot matrix and comprise capital characters A-Z and numbers 0-9; the information coding blocks of 18 color blocks of four parts are respectively represented by C1-C18, D1-D18, E1-E18 and F1-F18, 18 bits are respectively corresponding to 18 bits, and 18 bits are used for coding a 6-bit character and are used for representing characters A-Z and 0-9; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; the information coding block in the third area is printed and coded by adopting a green color block and a blank color block, wherein the green color block represents '1' of the binary system, and the blank color block represents '0' of the binary system; the character printing block in the third area adopts a red color block and a blank color block to print characters; and the code of the color block of the third area is used for distinguishing different aquaculture net cages.
Further, the step S32 specifically includes: s321: grouping the 16-bit information into 4 groups, wherein each group contains 4-bit information; coding by adopting a 4+3 hamming error correcting code, namely carrying out error correcting coding on each group of 4-bit information by using 4-bit information bits and 3-bit check bits to form 7-bit error correcting codes; s322: dividing the first 28 bits B1-B28 into 4 groups of 7 bits, respectively representing a group of 7-bit error code encoding in step S321; s323: repeat the encoding of the previous 28 bits B1-B28 for B29-B56; s324: adopting a 16+5 Hamming error correction code for 16 bit information bits, calculating a check code part, and obtaining a 5 bit check code; the last 10 bits B57-B66 are divided into 2 groups of 5 bits each storing the check code portion of a 16+5 Hamming error correction code.
Further, the setting of the hamming error correction code of 16 bits of information bits plus 5 bits of check bits in step S324 specifically includes: let 16 bits of information be b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 and b16, and the inserted 5-bit check code be p1, p2, p3, p4 and p5, so that 21 bits of code are p1, p2, b1, p3, b2, b3, b4, p4, b5, b6, b7, b8, b9, b10, b11, p5, b12, b13, b14, b15 and b 16.
Further, the calculating of the value of each check bit specifically includes: p1 is the 1 st bit of the whole code word, from the current bit number, checking 1 bit, spacing 1 bit, and then checking 1 bit; the code word bits checked by the p1 check code bit include: determining the value of p1 according to odd check rules at 1 st, 3 rd, 5 th, 7 th, 9 th, 11 th, 13 th, 15 th, 17 th, 19 th and 21 st bits; p2 is the 2 nd bit of the whole code word, from the current bit number, continuously checking 2 bits, spacing 2 bits, and then continuously checking 2 bits; the code word bits checked by the p2 check code bit include: determining the value of p2 according to odd check rules at 2 nd, 3 rd, 6 th, 7 th, 10 th, 11 th, 14 th, 15 th, 18 th and 19 th bits; p3 is the 4 th digit of whole code word, from the current digit, continuously checks 4 digits, separates 4 digits, continuously checks 4 digits again, the code word digit checked by the p3 check code digit includes: determining the value of p3 according to the odd check rule at 4 th, 5 th, 6 th, 7 th, 12 th, 13 th, 14 th, 15 th, 20 th and 21 st bits; p4 is the 8 th bit of the whole code word, from the current bit number, continuously checking 8 bits, spacing 8 bits, and then continuously checking 8 bits; the code word bits checked by the p4 check code bit include: 8 th, 9 th, 10 th, 11 th, 12 th, 13 th, 14 th, 15 th bits; determining a p4 value according to an odd check rule; p5 is the 16 th bit of the whole code word, from the current bit number, continuously checking 16 bits, spacing 16 bits, and then continuously checking 16 bits; the code word bits checked by the p5 check code bit include: 16 th, 17 th, 18 th, 19 th, 20 th, 21 st bits; the value of p5 is determined according to the odd check rule.
Further, the information encoding of the 18 color blocks in step S33 specifically includes: s331: dividing 6 bits of information into 6 groups, and coding each group of 1 bit of information by adopting a 1+2 hamming error correction code, namely carrying out error correction coding on each group of 1 bit of information by using 1 bit of information bits and 2 bit check bits to form 3 bits of error correction coding; s332: the 18 bits are divided into 6 groups of 3 bits, respectively representing a group of 3-bit error correction coding in step S331.
Compared with the prior art, the invention has the following beneficial effects: the two-dimensional image identification method for automatically identifying the aquaculture net cage, provided by the invention, realizes the mapping between the spatial distribution of the image blocks and the ASCII character strings, and is convenient for machine identification; the machine has the advantages that the machine is provided with the codes of machine identification information and characters identified by human eyes, the machine can be automatically identified, the human eyes can be conveniently identified, the machine and the characters are mutually supplemented and fault-tolerant, and the defiling interference of biological attachment on identification patterns and characters can be effectively resisted; the video is used for automatically identifying the codes and characters on the net cage and the two-dimensional identification, so that the attachment interference of marine organisms can be effectively resisted, and the identification rate of the automatic identification of the aquaculture net cage machine is improved; meanwhile, the ability of distinguishing and identifying by human eyes is not lost, so that the method can be applied to net cage identification in a marine culture environment, the automatic management of culture is facilitated, and errors caused by manual records of culture workers are reduced.
Drawings
FIG. 1 is a flow chart of a two-dimensional image identification method for automatic identification of aquaculture net cages in the embodiment of the invention;
FIG. 2 is a sectional view of a two-dimensional image color block functional area according to an embodiment of the present invention;
FIG. 3 is a two-dimensional image color block partition distribution diagram according to an embodiment of the present invention;
fig. 4 is a two-dimensional image identification diagram in an embodiment of the invention.
Detailed Description
The invention is further described below with reference to the figures and examples.
Fig. 1 is a flow chart of a two-dimensional image identification method for automatic identification of aquaculture net cages in the embodiment of the invention.
Referring to fig. 1, the method for identifying a two-dimensional image of an aquaculture net cage according to an embodiment of the present invention includes the following steps:
s1: dividing a two-dimensional image space into X parts at equal intervals along the X direction and Y parts at equal intervals along the Y direction under a rectangular coordinate system to form X multiplied by Y color blocks, and determining the color value range of the color blocks;
s2: dividing all color blocks into three functional areas, wherein the first area 1 is used for positioning and correcting a two-dimensional image; the second area 2 encodes the machine identification information; the third area 3 simultaneously performs coding of machine identification information and printing of human eye identification characters;
s3: determining the color definition of each color block of the first region 1 according to the region classification of the step S2; determining the coding rule and the color definition of each color block of the second area 2; determining the coding rule and the color definition of each color block of the third area 3;
s4: and according to the coding rule and the color definition of the color blocks of each region in the step S3, marking the two-dimensional image to form a two-dimensional coded image.
Specifically, the two-dimensional image identification method for automatically identifying the aquaculture net cage according to the embodiment of the invention divides a two-dimensional image space into 19 × 17 parts in XY two directions to form 323 color blocks, wherein the color value range of the color blocks includes a blank color block, a red color block and a green color block, the blank color block is any color block except the red color block and the green color block, and can be a white color block, a black color block and the like, and the background color of a printing medium is usually selected.
Referring to fig. 2, in the two-dimensional image identification method for automatically identifying a aquaculture net cage according to the embodiment of the invention, 323 color blocks are divided into three regions: a first area 1, a second area 2 and a third area 3, the first area 1 comprising 9 positioning portions located at the intersections of the pattern: a 2 × 2 color block square pattern at four corners of the two-dimensional image, a 3 × 2 color block rectangular pattern between two top and bottom square patterns, a four color block T-shaped pattern between two left and right square patterns, and a 3 × 3 color block square pattern at the center of the two-dimensional image; the second area 2 comprises 12 machine binary identification portions, located on the positioning portion connecting line: 6 rectangular patterns of 6 x 1 color blocks transversely connecting the parts of the first region and 6 rectangular patterns of 1 x 5 color blocks longitudinally connecting the parts of the first region; the third area comprises 4 human eye and machine character recognition parts, the 4 human eye and machine character recognition parts are positioned on 4 blocks divided by the first area 1 and the second area 2, a rectangular figure of a 5 multiplied by 7 color block close to the right side of each part of the 4 parts is a printing block of human eye recognition characters, a rectangular figure of a 5 multiplied by 7 color block close to the left side of each part can also be used as a printing block of human eye recognition characters, and other color blocks of each part are coding blocks of machine recognition information.
Specifically, in the two-dimensional image identification method for automatically identifying the aquaculture net cage, the first area 1 is used for space positioning of a two-dimensional image so as to help stretching and rotation transformation of an input image during machine identification and improve identification accuracy, and the first area is defined by 1 color: defining a color block connecting the four corner field-shaped graphs and the third area 3 as a blank color block, and defining the other three color blocks as red color blocks; three color blocks, which are connected with the second area 2, of the rectangular graph between the top and bottom two field graphs are defined as red color blocks, and the other three color blocks are defined as empty color blocks; three color blocks which are connected with the second region 2 and a T-shaped pattern in the middle of the two left and right grid patterns are defined as red color blocks, and the other color block is defined as a blank color block; four color blocks connecting the square pattern in the center of the two-dimensional image and the second region 2 are defined as red color blocks, and the other five color blocks are defined as empty color blocks.
Referring to fig. 3, in the two-dimensional image identification method for automatic identification of aquaculture net cages according to the embodiment of the present invention, 66 color blocks in the second area 2 are respectively represented by B1-B66, and correspond to 66 bits, the 66 bits are used to encode 16 bits of information, the 16 bits of information represent 1 16-bit character or 2 8-bit characters, the 1 16-bit character is used to represent a chinese character, and the 2 8-bit characters are used to represent two ASCII code characters; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; and the color blocks in the second area 2 are printed and coded by adopting green color blocks and empty color blocks, the green color blocks represent binary '1', the empty color blocks represent binary '0', and the codes of the 2 color blocks in the second area are used for distinguishing different breeding platforms of breeding enterprises or breeding enterprises.
Specifically, according to the two-dimensional image identification method for automatically identifying the aquaculture net cage, the first 28 bits B1-B28 of the second area 2 group the 16 bits of information into 4 groups, and each group has 4 bits. Each group of 4-bit information is encoded by adopting a 4+3 Hamming error correction code, namely 7-bit encoding is used for realizing the error correction of any 1 bit in 4 bits. The next 28 bits B29-B56 repeat the encoding of the previous 28 bits. And finally, dividing the remaining 10 bits B57-B66 into 2 groups, wherein each group of 5 bits stores check code bits of the 16+5 Hamming error correcting code, and does not store source information bits. Therefore, the contents of B1-B28 are the same as B29-B56, and the contents of B57-B61 are the same as B52-B62. By the coding method, at least 10 bits can be corrected simultaneously, and reliable identification under the condition of maximum loss of 62.5% can be met.
With reference to fig. 3, in the two-dimensional image identification method for automatic identification of a aquaculture net cage according to the embodiment of the present invention, each part of the third area 3 includes 35 color block character printing blocks and 18 color block information encoding blocks. The character printing block is used for printing characters of 5 multiplied by 7 dot matrixes, and comprises capital characters A-Z and numbers 0-9; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; the information coding block in the third area is printed and coded by adopting a green color block and a blank color block, wherein the green color block represents '1' of the binary system, and the blank color block represents '0' of the binary system; the character printing block in the third area adopts a red color block and a blank color block to perform printing and coding; the coding of 3 color blocks of the third area is used for distinguishing different aquaculture net cages, and 4 parts can comprise 3-dimensional codes: lines 1-9; 1-9 lines, No. 1-99 net cages; for rows or columns greater than 9, the letters a-Z are used. The information coding blocks of 18 color blocks of four parts are respectively represented by C1-C18, D1-D18, E1-E18 and F1-F18, 18 bits are respectively corresponding to 18 bits, and 18 bits are used for coding one 6-bit character to represent characters A-Z and 0-9; the 6-bit information is divided into 6 groups, and 1+2 Hamming error correction codes are used for 1 bit of information in each group. I.e. 3-bit encoding, error correction of 1-bit information is achieved. Therefore, the 6-bit information uses 18-bit codes in total, and the 6-bit information can be corrected simultaneously, thereby satisfying the reliable identification under the condition of 66.6% of the maximum loss.
The encoding of 36 character sets, characters a-Z and 0-9, uses 36 of 64 code spaces for 6-bit encoding, with the remaining 28 encodings reserved, as shown in table 1 below. A portion of the text encoding is reserved for future expansion.
Figure BDA0002587878600000071
TABLE 16 bit character set
In the two-dimensional image identification method for automatic identification of the aquaculture net cage, the check code is calculated, and the longest information code is 16 bits, so that a hamming error correction code formed by adding 16 information bits and 5 check bits is used for explanation. Less than 16 bits of code, such as 1+2 and 4+3, the check code is computed in the same way.
Let 16 bits of information be b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 and b16, and the inserted 5-bit check code be p1, p2, p3, p4 and p5, so that 21 bits of code are p1, p2, b1, p3, b2, b3, b4, p4, b5, b6, b7, b8, b9, b10, b11, p5, b12, b13, b14, b15 and b 16.
The specific calculation methods of p1, p2, p3, p4 and p5 are as follows:
the check rule for p1 (1 st check bit, also 1 st bit of the whole codeword) is: from the current number of bits, check 1 bit, then skip 1 bit, check 1 bit again, skip 1 bit again, … …. Thus, the code word bits that the p1 check code bits can check include: 1 st (i.e., p1 itself), 3 rd, 5 th, 7 th, 9 th, 11 th, 13 th, 15 th, 17 th, 19 th, 21 st bit. And finally determining the value of the check bit according to the odd check rule.
The check rule for p2 (2 nd parity bit, which is also the 2 nd bit of the entire codeword) is: from the current number of bits, 2 bits are checked consecutively, then 2 bits are skipped, then 2 bits are checked consecutively, and then 2 bits are skipped, … …. Thus, the code word bits that the p2 check code bits can check include: 2 nd (i.e., p2 itself), 3 rd, 6 th, 7 th, 10 th, 11 th, 14 th, 15 th, 18 th, 19 th. And finally determining the value of the check bit according to the odd check rule.
The check rule for p3 (the 3 rd check bit, which is also the 4 th bit of the entire codeword) is: from the current number of bits, 4 bits are checked consecutively, then 4 bits are skipped, then 4 bits are checked consecutively, and then 4 bits are skipped, … …. Thus, the code word bits that the p3 check code bits can check include: the 4 th position (i.e., p3 itself), the 5 th position, the 6 th position, the 7 th position, the 12 th position, the 13 th position, the 14 th position, the 15 th position, the 20 th position, and the 21 st position. And finally determining the value of the check bit according to the odd check rule.
The check rule for p4 (the 4 th check bit, which is also the 8 th bit of the entire codeword) is: from the current number of bits, 8 bits are checked consecutively, then 8 bits are skipped, then 8 bits are checked consecutively, and then 8 bits are skipped, … …. Thus, the code word bits that the p4 check code bits can check include: position 8 (i.e., p4 itself), position 9, position 10, position 11, position 12, position 13, position 14, position 15. And finally determining the value of the check bit according to the odd check rule.
The check rule for P5 (the 5 th check bit, which is also the 16 th bit of the entire codeword) is: from the current number of bits, 16 bits are checked consecutively, then 16 bits are skipped, then 16 bits are checked consecutively, and then 16 bits are skipped, … …. Thus, the code word bits that the p5 check code bits can check include: 16 th (i.e., p5 itself), 17 th, 18 th, 19 th, 20 th, 21 st. And finally determining the value of the check bit according to the odd check rule.
1-bit information error correction coding method: 1 bit information adopts 1+2 Hamming error correcting code, namely 3 bits of code. Assuming that 1-bit information is b1 and the inserted 2-bit check code is p1 and p2, the 3-bit code is: p1, p2, b 1. The specific calculation method of the check codes p1 and p2 is described in the calculation of the check codes p1 and p2 in the 16-bit coding.
The 4-bit information error correction coding method comprises the following steps: 4 bits of information adopt 4+3 hamming error correcting codes, namely 7 bits of codes are used for coding. Assuming that 4 bits of information are b1, b2, b3 and b4, and the inserted 3-bit check code is p1, p2 and p3, then the 7-bit code is: p1, p2, b1, p3, b2, b3 and b 4. The specific calculation methods of the check codes p1, p2 and p3 are as described in the foregoing 16-bit encoding of the check codes p1, p2 and p 3.
Take AW6903 two-dimensional coding as an example, where AW represents an enterprise, and the two ASCII code characters represented by the second region are the portions that can not be recognized by human eyes but only by machine vision, and 6903 the portions that can be recognized by human eyes and machine vision are represented by the third region.
A second region: the ASCII code of A is 01000001, the ASCII code of W is 01010111, and after grouping, according to the encoding and calculation rule of the check code, 0100 code is 0000100; 0001 encoding 0100001; 0101 coded as 1001101; 0111 coded as 1100111; both B1-B28 and B29-B56 encoded 0000100010000110011011100111. The 16-bit code 0100000101010111 of AW is error correction coded to become 110010010001010110111, wherein the 5-bit check code bits p1-p5 are 11011, so that the codes of B57-B61 and B52-B62 are 11011.
A third region: the code of 6 is 010110, and after block coding is carried out according to the coding and calculation rules of the check code, C1-C18 are 110001110001001110; the code of 9 is 011001, and D1-D18 is 110001001110110001 after block coding according to the coding and calculation rule of the check code; 0: the code of (3) is 010000, and E1-E18 is 110001110110110110 after block coding according to the coding and calculation rules of the check code; the code of 3 is 010011, after block coding according to the coding and calculation rules of the check code, E1-E18 is 110001110110001001, and an AW6903 two-dimensional coding color block diagram is obtained according to the condition that a green color block represents binary '1' and a null color block represents binary '0', as shown in FIG. 4.
In conclusion, the two-dimensional image identification method for automatically identifying the aquaculture net cage disclosed by the embodiment of the invention realizes the mapping between the spatial distribution of the image blocks and the ASCII character strings, and is convenient for machine identification; the machine has the advantages that the machine is provided with the codes of machine identification information and characters identified by human eyes, the machine can be automatically identified, the human eyes can be conveniently identified, the machine and the characters are mutually supplemented and fault-tolerant, and the defiling interference of biological attachment on identification patterns and characters can be effectively resisted; the video is used for automatically identifying the codes and characters on the net cage and the two-dimensional identification, so that the attachment interference of marine organisms can be effectively resisted, and the identification rate of the automatic identification of the aquaculture net cage machine is improved; meanwhile, the ability of distinguishing and identifying by human eyes is not lost, so that the method can be applied to net cage identification in a marine culture environment, the automatic management of culture is facilitated, and errors caused by manual records of culture workers are reduced.
Although the present invention has been described with respect to the preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. A two-dimensional image identification method for automatic identification of aquaculture net cages is characterized by comprising the following steps:
s1: dividing a two-dimensional image space into X parts at equal intervals along the X direction and Y parts at equal intervals along the Y direction under a rectangular coordinate system to form X multiplied by Y color blocks, and determining the color value range of the color blocks;
s2: dividing all color blocks into three functional areas, wherein the first area is used for positioning and correcting a two-dimensional image; the second area encodes the machine identification information; the third area simultaneously performs coding of machine identification information and printing of human eye identification characters;
s3: determining the color definition of each color block of the first area according to the area classification of the step S2; determining the coding rule and the color definition of each color block in the second area; determining the coding rule and the color definition of each color block in the third area;
s4: and according to the coding rule and the color definition of the color blocks of each region in the step S3, marking the two-dimensional image to form a two-dimensional coded image.
2. The method for identifying a two-dimensional image of an automatic identification of an aquaculture net cage according to claim 1, wherein in the step S1, the value of X is 19, the value of Y is 17, and the two-dimensional image is divided into 323 color blocks; the color value range of the color block comprises a blank color block, a red color block and a green color block, wherein the blank color block is the color block of any color except the red color block and the green color block.
3. The two-dimensional image identification method for automatically identifying an aquaculture net cage according to claim 2, wherein the step S2 specifically comprises:
s21: dividing a first area, wherein the first area comprises a 2 multiplied by 2 color block field character pattern at four corners of the two-dimensional image, a 3 multiplied by 2 color block rectangular pattern between two field character patterns at the top and the bottom, a four-color block T-shaped pattern between two field character patterns at the left side and the right side, and a 3 multiplied by 3 color block square pattern at the center of the two-dimensional image;
s22: dividing a second area, wherein the second area comprises a rectangular graph of 6 multiplied by 1 color blocks which transversely connect all parts of the first area and a rectangular graph of 1 multiplied by 5 color blocks which longitudinally connect all parts of the first area;
s23: and dividing a third area, wherein color blocks except the first area and the second area in the two-dimensional image are the third area, the first area and the second area divide the third area into four parts, a rectangular graph of a 5 multiplied by 7 color block on the right side of each part is a printing block for identifying characters by human eyes, and other color blocks of each part are coding blocks of machine identification information.
4. The two-dimensional image identification method for automatically identifying an aquaculture net cage according to claim 3, wherein the step S3 specifically comprises the following steps:
s31: defining color block colors of a first area, defining a color block connecting the four corner field patterns and a third area as a blank color block, and defining the other three color blocks as red color blocks; defining three color blocks, which are connected with a rectangular graph between the top and bottom two field graphs and the second area, as red color blocks, and defining the other three color blocks as empty color blocks; defining three color blocks, which are connected with a T-shaped graph in the middle of the two left and right field graphs and the second area, as red color blocks, and defining the other color block as a blank color block; four color blocks connecting the square graph in the center of the two-dimensional image and the second area are defined as red color blocks, and the other five color blocks are defined as empty color blocks;
s32: defining color block coding and color of a second area, respectively representing 66 color blocks of the second area by B1-B66, corresponding to 66 bits, using the 66 bits for coding 16 bits of information, wherein the 16 bits of information represent 1 16-bit character or 2 8-bit characters, 1 16-bit character is used for representing a Chinese character, and 2 8-bit characters are used for representing two ASCII code characters; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; color of the second areaThe blocks are printed and coded by adopting green color blocks and empty color blocks, wherein the green color blocks represent binary '1', and the empty color blocks represent binary '0'; the codes of the color blocks in the second area are used for distinguishing different breeding enterprises or different breeding platforms of the breeding enterprises;
s33: defining color block codes and colors of a third area, wherein each part of the third area comprises character printing blocks of 35 color blocks and information coding blocks of 18 color blocks, and the character printing blocks are used for printing characters of a 5 multiplied by 7 dot matrix and comprise capital characters A-Z and numbers 0-9; the information coding blocks of 18 color blocks of four parts are respectively represented by C1-C18, D1-D18, E1-E18 and F1-F18, 18 bits are respectively corresponding to 18 bits, and 18 bits are used for coding a 6-bit character and are used for representing characters A-Z and 0-9; setting a check code for checking and correcting, wherein the check code is set at the 2 ndnThe position of the bit adopts odd check; the information coding block in the third area is printed and coded by adopting a green color block and a blank color block, wherein the green color block represents '1' of the binary system, and the blank color block represents '0' of the binary system; the character printing block in the third area adopts a red color block and a blank color block to print characters; and the code of the color block of the third area is used for distinguishing different aquaculture net cages.
5. The two-dimensional image identification method for automatic identification of aquaculture net cages of claim 4, wherein the step S32 specifically comprises the following steps:
s321: grouping the 16-bit information into 4 groups, wherein each group contains 4-bit information; coding by adopting a 4+3 hamming error correcting code, namely carrying out error correcting coding on each group of 4-bit information by using 4-bit information bits and 3-bit check bits to form 7-bit error correcting codes;
s322: dividing the first 28 bits B1-B28 into 4 groups of 7 bits, respectively representing a group of 7-bit error code encoding in step S321;
s323: repeat the encoding of the previous 28 bits B1-B28 for B29-B56;
s324: adopting a 16+5 Hamming error correction code for 16 bit information bits, calculating a check code part, and obtaining a 5 bit check code; the last 10 bits B57-B66 are divided into 2 groups of 5 bits each storing the check code portion of a 16+5 Hamming error correction code.
6. The two-dimensional image identification method for automatic identification of aquaculture net cages of claim 5, wherein the setting of the hamming error correction code of 16-bit information bits plus 5-bit check bits in step S324 specifically comprises: let 16 bits of information be b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15 and b16, and the inserted 5-bit check code be p1, p2, p3, p4 and p5, so that 21 bits of code are p1, p2, b1, p3, b2, b3, b4, p4, b5, b6, b7, b8, b9, b10, b11, p5, b12, b13, b14, b15 and b 16.
7. The method for identifying the two-dimensional image of the aquaculture net cage according to claim 6, wherein the calculation of the value of each check digit specifically comprises:
p1 is the 1 st bit of the whole code word, from the current bit number, checking 1 bit, spacing 1 bit, and then checking 1 bit; the code word bits checked by the p1 check code bit include: determining the value of p1 according to odd check rules at 1 st, 3 rd, 5 th, 7 th, 9 th, 11 th, 13 th, 15 th, 17 th, 19 th and 21 st bits;
p2 is the 2 nd bit of the whole code word, from the current bit number, continuously checking 2 bits, spacing 2 bits, and then continuously checking 2 bits; the code word bits checked by the p2 check code bit include: determining the value of p2 according to odd check rules at 2 nd, 3 rd, 6 th, 7 th, 10 th, 11 th, 14 th, 15 th, 18 th and 19 th bits;
p3 is the 4 th digit of whole code word, from the current digit, continuously checks 4 digits, separates 4 digits, continuously checks 4 digits again, the code word digit checked by the p3 check code digit includes: determining the value of p3 according to the odd check rule at 4 th, 5 th, 6 th, 7 th, 12 th, 13 th, 14 th, 15 th, 20 th and 21 st bits;
p4 is the 8 th bit of the whole code word, from the current bit number, continuously checking 8 bits, spacing 8 bits, and then continuously checking 8 bits; the code word bits checked by the p4 check code bit include: 8 th, 9 th, 10 th, 11 th, 12 th, 13 th, 14 th, 15 th bits; determining a p4 value according to an odd check rule;
p5 is the 16 th bit of the whole code word, from the current bit number, continuously checking 16 bits, spacing 16 bits, and then continuously checking 16 bits; the code word bits checked by the p5 check code bit include: 16 th, 17 th, 18 th, 19 th, 20 th, 21 st bits; the value of p5 is determined according to the odd check rule.
8. The two-dimensional image identification method for automatically identifying the aquaculture net cage according to claim 4, wherein the information coding of the 18 color blocks in the step S33 specifically comprises the following steps:
s331: dividing 6 bits of information into 6 groups, and coding each group of 1 bit of information by adopting a 1+2 hamming error correction code, namely carrying out error correction coding on each group of 1 bit of information by using 1 bit of information bits and 2 bit check bits to form 3 bits of error correction coding;
s332: the 18 bits are divided into 6 groups of 3 bits, respectively representing a group of 3-bit error correction coding in step S331.
CN202010686835.2A 2020-07-16 2020-07-16 Two-dimensional image identification method for automatic identification of culture net cage Active CN111814790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010686835.2A CN111814790B (en) 2020-07-16 2020-07-16 Two-dimensional image identification method for automatic identification of culture net cage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010686835.2A CN111814790B (en) 2020-07-16 2020-07-16 Two-dimensional image identification method for automatic identification of culture net cage

Publications (2)

Publication Number Publication Date
CN111814790A true CN111814790A (en) 2020-10-23
CN111814790B CN111814790B (en) 2024-03-29

Family

ID=72866127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010686835.2A Active CN111814790B (en) 2020-07-16 2020-07-16 Two-dimensional image identification method for automatic identification of culture net cage

Country Status (1)

Country Link
CN (1) CN111814790B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009042826A (en) * 2007-08-06 2009-02-26 Dentsu Inc Two dimensional code creation system and two dimensional code printing medium
CN101515335A (en) * 2009-03-30 2009-08-26 浙江工业大学 Color two dimension bar code with high compression ratio Chinese character coding capability and its coding and decoding method
KR20110106261A (en) * 2011-09-08 2011-09-28 (주)이컴앤드시스템 An extracting/decoding device for 2d barcode image of arbitrary contrast
CN103020689A (en) * 2013-01-16 2013-04-03 重庆大学 Method for recognizing hole-shaped codes of articles on basis of geometric figures
CN111091012A (en) * 2019-11-27 2020-05-01 深圳市智微智能软件开发有限公司 Bar code generating method of bar code machine and related product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009042826A (en) * 2007-08-06 2009-02-26 Dentsu Inc Two dimensional code creation system and two dimensional code printing medium
CN101515335A (en) * 2009-03-30 2009-08-26 浙江工业大学 Color two dimension bar code with high compression ratio Chinese character coding capability and its coding and decoding method
KR20110106261A (en) * 2011-09-08 2011-09-28 (주)이컴앤드시스템 An extracting/decoding device for 2d barcode image of arbitrary contrast
CN103020689A (en) * 2013-01-16 2013-04-03 重庆大学 Method for recognizing hole-shaped codes of articles on basis of geometric figures
CN111091012A (en) * 2019-11-27 2020-05-01 深圳市智微智能软件开发有限公司 Bar code generating method of bar code machine and related product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卫皓茜: "一种新型彩色二维码技术的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 01, 15 January 2018 (2018-01-15) *

Also Published As

Publication number Publication date
CN111814790B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
WO2020181592A1 (en) Matrix qr code, generating method and device therefor and decoding method and device therefor
CN104239522B (en) Inter-image content constraint-based ultra-pixel coding image retrieval method
CN108073966A (en) A kind of conversion method of Quick Response Code and hole horizontal and vertical parity check code
CN104636779B (en) Ring code identifies identifying system
CN104680217B (en) A kind of product information dot matrix coding/decoding system application process
CN105095937A (en) Visual identification method based on linear clustering circular array graphic code
CN111814790B (en) Two-dimensional image identification method for automatic identification of culture net cage
DE102018008539B4 (en) Calibration device and method for camera calibration for photogrammetry
DE3820093A1 (en) ARRANGEMENT AND METHOD FOR CODED DATA TRANSFER
CN107170020A (en) Dictionary learning still image compression method based on minimum quantization error criterion
CN108073963B (en) Fusion two-dimensional code generation method and device
US11755640B2 (en) DNA-based image storage and retrieval
US4523331A (en) Automated image input, storage and output system
CN108491747A (en) Beautify the method for QR codes after a kind of blending image
CN115801262B (en) Intersection operator space retrieval method based on elastic search technology
CN106485305A (en) A kind of implementation method of color 2 D code
CN114360449B (en) Multi-pixel fusion compression method for Mura calibration of display
CN112102420B (en) Camera calibration plate and calibration method
JP2877356B2 (en) Image data processing method
CN111598198B (en) Image two-dimensional code generation method and reading method based on LSB information hiding
CN116795939B (en) Method for realizing geographic data restoration based on geotools
CN116775786B (en) Geographic data image working method for repairing over-acute angle based on geotools
CN1622135A (en) Digital image color correction method
DE102004063950B4 (en) channel coding
Wang et al. Image classification with structured self-organization map

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant