CN114049653A - Pig face identification method, pig face identification system, pig face identification equipment and storage medium - Google Patents

Pig face identification method, pig face identification system, pig face identification equipment and storage medium Download PDF

Info

Publication number
CN114049653A
CN114049653A CN202111309640.7A CN202111309640A CN114049653A CN 114049653 A CN114049653 A CN 114049653A CN 202111309640 A CN202111309640 A CN 202111309640A CN 114049653 A CN114049653 A CN 114049653A
Authority
CN
China
Prior art keywords
pig
detected
identification
image
face
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.)
Withdrawn
Application number
CN202111309640.7A
Other languages
Chinese (zh)
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.)
Shenzhen Boan Zhikong Technology Co ltd
Original Assignee
Shenzhen Boan Zhikong Technology 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 Shenzhen Boan Zhikong Technology Co ltd filed Critical Shenzhen Boan Zhikong Technology Co ltd
Priority to CN202111309640.7A priority Critical patent/CN114049653A/en
Publication of CN114049653A publication Critical patent/CN114049653A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The application relates to a pig face identification method, a pig face identification system, identification equipment and a storage medium, which are applied to the field of pig face identification, wherein the method comprises the following steps: acquiring the information of a pig face image to be detected sent by image shooting equipment, and determining a pig face area image to be detected; acquiring preset pig identity data, comparing the similarity of the to-be-detected pig face region image with the standard pig face region image, and setting an actual identity mark with the similarity meeting the requirement as an identification identity mark; if the identification mark is not unique, acquiring the data of the position to be detected among all the pig face characteristic points; and eliminating the authentication identity marks according to the position data to be detected and the standard position data, and setting the residual authentication identity mark information after elimination as the authentication identity marks. The application has the technical effects that: through comparing the pig face image of shooing and waiting to examine the mode of characteristic point position relation in the pig face image, reached and carried out accurate discernment's effect to the pig face, improved the effect that the pig was only discerned.

Description

Pig face identification method, pig face identification system, pig face identification equipment and storage medium
Technical Field
The present application relates to the field of pig face identification technology, and in particular, to a pig face identification method, system, identification device, and storage medium.
Background
In recent years, with the national requirements on intensive management and accurate monitoring of breeding enterprises, livestock can be effectively identified and managed, and the requirements of breeding enterprises are gradually increased; for the pig breeding industry in the breeding industry, if the lifelong tracking of each pig can be carried out, the method has very important significance for food safety and pig raising management.
At present, most of identity management of pigs uses electronic ear tags or ear tags, and the identity of the pigs is confirmed by reading information of the electronic ear tags or ear tags.
In the process of implementing the application, the inventor finds that at least the following problems exist in the technology: this kind of pig identification mode only needs beat electronic ear tag or ear tablet on the ear of pig, can only cause the injury on the pig, beats the ear tag and also needs a large amount of labour costs, is the injury of penetrability in addition to the pig.
Disclosure of Invention
In order to help solve the problem that ear tags can only cause harm to pigs and improve the identification effect of the pigs, the pig face identification method, the pig face identification system, the pig face identification equipment and the storage medium are provided.
In a first aspect, the present application provides a pig face identification method, which adopts the following technical scheme: the method comprises the following steps: acquiring pig face image information to be detected sent by image shooting equipment, wherein the pig face image information comprises pig face characteristic point images of pig noses, pig eyes, pig ears and the like;
determining a pig face area image to be detected in the pig face image information according to the pig face characteristic point image in the pig face image information to be detected;
acquiring preset pig identity data, wherein the pig identity data comprises actual identity marks of all pigs, standard pig face area images corresponding to the actual identity marks and standard position data between pig face characteristic points corresponding to the actual identity marks;
carrying out similarity comparison on the to-be-detected pig face region image and the standard pig face region image, and setting an actual identity corresponding to the standard pig face region image with the similarity larger than a preset first legal value as an identification identity corresponding to the to-be-detected pig face region image;
if the identification identity corresponding to the face region image to be detected is not unique, acquiring position data to be detected among all face characteristic points in the face image information of the pig to be detected;
and rejecting the identification according to a comparison result between the position data to be detected and the standard position data, and setting the information of the identification which is left after rejection as the identification corresponding to the image of the face area of the pig to be detected.
According to the technical scheme, when the identity of the pig is required to be recognized, firstly, the face of the pig is shot through image shooting equipment to obtain a pig face image, then, an image of a pig face area to be detected is determined according to characteristic points of pig ears, pig eyes, pig noses and the like in the pig face image, after similarity comparison is carried out on the image information of the pig face to be detected and all pig body data, an identification identity corresponding to the image information of the pig face to be detected is obtained preliminarily; if the identification is unique, finishing the current pig face identification; if the obtained identification identity is not unique, the identification identity is removed according to the comparison result of the to-be-detected position data among the characteristic points of the pig ears, the pig eyes, the pig nose and the like in the image information of the pig face to be detected and the standard position data in the pig identity data, and then the identity of the pig to be detected is confirmed, so that the pig face is identified by shooting the pig face, and the pig identification effect is improved; when the identification identity obtained by the image comparison is not unique, the identification identity is further removed by comparing the position relation of the characteristic points in the pig face image to be detected, so that the identification effect of the pig is further improved.
Preferably, the standard position data comprises standard distance values between each pig face feature point;
the removing the identification mark according to the comparison result between the to-be-detected position data and the standard position data comprises the following steps:
calculating actual distance values among all pig face characteristic points in the pig face image information to be detected, and setting the actual distance values as position data to be detected;
and comparing the actual distance value corresponding to the to-be-detected position data with the standard distance value corresponding to the standard position data to obtain a difference value between the actual distance value and the standard distance value, and eliminating the identification identity corresponding to the actual distance value of which the difference value is greater than a preset second legal value.
Through the technical scheme, when the identification is rejected by comparing the position relation of the characteristic points in the pig face image to be detected, the actual distance values among the characteristic points of the pig ears, the pig eyes, the pig noses and the like in the pig face image information to be detected are firstly calculated, then the calculated actual distance values are compared with the standard distance values corresponding to the standard position data, the identification corresponding to the actual distance values with the difference value between the actual distance values and the standard distance values being larger than the preset second legal value is rejected, and therefore the effect of rejecting the identification according to the position relation of the characteristic points is achieved.
Preferably, the pig identity data further comprises standard skin color information corresponding to the actual identity;
the remaining authentication identity information after will rejecting sets up to the authentication identity who corresponds with waiting to examine pig face region image, includes:
if the identification identity mark remained after the elimination is not unique, obtaining the skin color information to be detected corresponding to the face region image of the pig to be detected;
and comparing the skin color information to be detected with the standard skin color information, eliminating the identification identity corresponding to the standard skin color information inconsistent with the skin color information to be detected, and setting the residual identification identity information after elimination as the identification identity corresponding to the face area image of the pig to be detected.
Through the technical scheme, the situation that different pig skin colors may be different is considered, the identification identity is removed by comparing the position relation of the characteristic points in the pig face image to be detected, if the identification identity is not unique, the skin color information to be detected corresponding to the pig face area image to be detected can be obtained, the identification identity is further removed by comparing the skin color information to be detected with the standard skin color information corresponding to the identification identity, and therefore the possibility of identification failure is reduced, and the identification effect of the pig only can be improved.
Preferably, the acquiring of the skin color information to be detected corresponding to the image of the face area of the pig to be detected comprises:
identifying characteristic point images corresponding to pig ears and pig eyes in the pig face area image to be detected;
determining an enclosed area formed by characteristic point images corresponding to pig ears and pig eyes;
and setting the skin color information corresponding to the surrounding area as the skin color information to be detected.
According to the technical scheme, the area formed by the pig ears and the pig eyes is located on the top of the head of the pig, the head area has the characteristic of being not easy to stain, when the skin color information to be detected is determined, the skin color information corresponding to the surrounding area formed by the characteristic point images corresponding to the pig ears and the pig eyes is selected, the possibility that the skin color information accuracy is influenced due to dirt on the surface of the skin is reduced, and therefore the pig face identification effect is further improved.
Preferably, the setting the skin color information corresponding to the surrounding area as the skin color information to be detected includes:
and determining a mud area in the surrounding area, removing the mud area in the surrounding area, and setting skin color information corresponding to the surrounding area after the mud area is removed as the skin color information to be detected.
Through above-mentioned technical scheme, to the image information that surrounds the regional correspondence, at first confirm the region that debris such as mud and dirt belonged to, the regional follow that will be sheltered from by mud is enclosed the regional rejection, has reduced and has surrounded the regional possibility that mud results in the recognition result to appear the deviation to pig face identification's precision has further been promoted.
Preferably, after the identification information remaining after the removing is set as the identification corresponding to the face region image of the pig to be detected, the method further comprises:
adding a pig face area image to be detected in the pig face image information into a standard area image corresponding to an identification identity;
and replacing the standard position data between the pig face characteristic points corresponding to the identification identity with the to-be-detected position data between the pig face characteristic points in the pig face image information to be detected.
Through the technical scheme, after the pig body is correctly identified at each time, the pig face area image to be detected is added into the standard area image corresponding to the identification identity, the effect of perfecting and supplementing the standard area image according to the actual detection result is achieved, the possibility that the pig face is difficult to identify due to large change of the pig face in the production process of the pig is reduced, and the pig identification effect is further improved.
Preferably, after the adding the pig face region image to be detected in the pig face image information into the standard region image corresponding to the identification mark, the method further includes:
recording a recording time point when the pig face area image to be detected is added to the standard area image;
and when the time difference value between the recording time point and the actual time point is greater than a preset updating value, moving the pig face area image to be detected corresponding to the recording time point out of the standard area image.
Through the technical scheme, the pig face region images with the storage time exceeding the preset updating value are deleted regularly in a mode of recording the recording time points when the pig face region images to be detected are added to the standard region images, the effect of deleting invalid pig face image information regularly is achieved, the data storage pressure is reduced, and the pig face identification efficiency is improved.
In a second aspect, the application provides a pig face recognition system, which adopts the following technical scheme: the system comprises: the image information acquisition module is used for acquiring the pig face image information to be detected sent by the image shooting equipment, wherein the pig face image information comprises pig nose, pig eyes, pig ears and other pig face characteristic point images;
the to-be-detected region determining module is used for determining a to-be-detected pig face region image in the to-be-detected pig face image information according to the pig face characteristic point image in the to-be-detected pig face image information;
the identity data acquisition module is used for acquiring preset pig identity data, wherein the pig identity data comprise actual identity marks of all pigs, standard pig face area images corresponding to the actual identity marks and standard position data among pig face characteristic points corresponding to the actual identity marks;
the pig body identification module is used for comparing the similarity of the to-be-detected pig face region image with the standard pig face region image, and setting an actual identity corresponding to the standard pig face region image with the similarity larger than a preset first legal value as an identification identity corresponding to the to-be-detected pig face region image;
the position data acquisition module is used for acquiring to-be-detected position data among all pig face characteristic points in the pig face image information to be detected if the identification identity corresponding to the pig face region image to be detected is not unique;
and the pig only identity determining module is used for removing the identification according to a comparison result between the position data to be detected and the standard position data, and setting the residual identification information after removal as the identification corresponding to the face region image of the pig to be detected.
According to the technical scheme, when the identity of the pig is required to be recognized, firstly, the face of the pig is shot through image shooting equipment to obtain a pig face image, then, an image of a pig face area to be detected is determined according to characteristic points of pig ears, pig eyes, pig noses and the like in the pig face image, after similarity comparison is carried out on the image information of the pig face to be detected and all pig body data, an identification identity corresponding to the image information of the pig face to be detected is obtained preliminarily; if the identification is unique, finishing the current pig face identification; if the obtained identification identity is not unique, the identification identity is removed according to the comparison result of the to-be-detected position data among the characteristic points of the pig ears, the pig eyes, the pig nose and the like in the image information of the pig face to be detected and the standard position data in the pig identity data, and then the identity of the pig to be detected is confirmed, so that the pig face is identified by shooting the pig face, and the pig identification effect is improved; when the identification identity obtained by the image comparison is not unique, the identification identity is further removed by comparing the position relation of the characteristic points in the pig face image to be detected, so that the identification effect of the pig is further improved.
In a third aspect, the present application provides an identification device, which adopts the following technical solution: comprising a memory and a processor, said memory having stored thereon a computer program which can be loaded by the processor and which can carry out some method as described above.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions: there is stored a computer program that can be loaded by a processor and that performs some of the methods described above.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the pig face recognition effect is achieved by means of shooting the pig face, and the pig face recognition effect is improved; when the identification identity obtained by the image comparison is not unique, the identification identity is further removed by comparing the position relation of the characteristic points in the face image of the pig to be detected, so that the identification effect of the pig only can be further improved;
2. after the identity of the pig is correctly identified each time, the area image of the pig face to be detected is added into the standard area image corresponding to the identification identity, the effect of perfecting and supplementing the standard area image according to the actual detection result is achieved, the possibility that the pig face is difficult to identify due to large change in the production process of the pig is reduced, and therefore the identification effect of the pig is further improved.
Drawings
Fig. 1 is a flow chart of a pig face identification method in an embodiment of the present application.
Fig. 2 is a schematic diagram of a pig face image recognition area in one embodiment of the present application.
Fig. 3 is a block diagram of a pig face recognition system in an embodiment of the present application.
Fig. 4 is a block diagram of a pig face recognition system in another embodiment of the present application.
Reference numerals: 301. an image information acquisition module; 302. a module for determining a region to be detected; 303. an identity data acquisition module; 304. a pig identity recognition module; 305. a location data acquisition module; 306. a pig only identity determination module; 307. and an identity data updating module.
Detailed Description
The present application is described in further detail below with reference to figures 1-4.
The embodiment of the application discloses a pig face identification method, the method is based on an image identification technology, after camera equipment such as a camera for shooting the pig face sends shot pig face image information to an identification system, the identification system can compare the shot pig face image information with pre-stored standard image information, and then through a mode of judging the similarity between images, an identity mark corresponding to the standard image information with the highest similarity obtained after comparison is set as a current pig identity mark to be detected, so that the identification of the pig face information is completed.
As shown in fig. 1, the method comprises the steps of:
and S10, acquiring the face image information of the pig to be detected sent by the image shooting equipment.
The pig face image information comprises pig face characteristic point images such as pig noses, pig eyes and pig ears; specifically, when the identity of the pig needs to be identified, image shooting equipment such as a video camera or a camera can shoot the image of the face of the pig under the control of the identification system, and the shot information of the face image of the pig to be detected is sent to the identification system; the identification system can check the image information of the pig face to be detected by checking whether the pig face characteristic points are complete or not, and when the images of the pig face characteristic points such as the pig nose, the pig eyes and the pig ears in the image information of the pig face to be detected all exist, the image information of the pig face to be detected is judged to be qualified, and the image shooting equipment is controlled to stop shooting.
And S20, determining the face region image of the pig to be detected in the information of the face image of the pig to be detected.
Specifically, after acquiring the information of the pig face image to be detected, the identification system determines the area where the pig face is located according to the positions of the pig face characteristic points such as the pig nose, the pig eyes and the pig ears, and then determines the area where the pig face is located as the pig face area image to be detected; that is, the image of the face region of the pig to be detected at least completely contains the pig face characteristic points such as the pig nose, the pig eyes, the pig ears and the like.
And S30, acquiring preset pig identity data.
Specifically, the pig identity data is data pre-stored in the identification system, and the pig identity data mainly comprises an actual identity of the pig, a standard pig face area image corresponding to the actual identity, standard position data between pig face characteristic points corresponding to the actual identity and standard skin color information corresponding to the actual identity; the standard position data comprises standard distance values among all the pig face characteristic points; the standard skin color information can be information formed by combining one or more of hue, lightness and purity in the image; the staff can set up only actual identification in advance for each pig in order to distinguish the pig, then correspond each actual identification respectively, shoot the pig in order to obtain the pig face identification image of pig, measure the corresponding distance of pig nose, pig eye and pig ear's pig face characteristic point and generate standard position data, record the hue, the lightness and the purity that the pig face part corresponds in the pig face identification image and generate standard skin color information.
And S40, comparing the similarity of the pig face area image to be detected with the standard pig face area image to obtain an identification identity.
Specifically, the identification system compares the similarity of the received pig face region image to be detected with the standard pig face region image in the acquired pig identity data, then obtains the standard pig face region image with the similarity of the pig face region image to be detected being greater than a preset first legal value, and sets an actual identity corresponding to the obtained standard pig face region image as an identification identity of the current pig, so as to complete the primary identification of the pig identity; and if the identification identity obtained after the similarity comparison is unique, determining that the obtained identification identity is the identity of the current pig to be detected, and thus finishing the identification of the pig identity.
And S50, if the identification identity corresponding to the face region image of the pig to be detected is not unique, acquiring the position data to be detected among all the face characteristic points in the face image information of the pig to be detected.
Specifically, if the identification identity obtained by the identification system is not unique after similarity comparison, further obtaining the position relationship among the pig nose, pig eyes, pig ears and other pig face characteristic points in the pig face image information to be detected, and setting the position relationship among the characteristic points as the position data to be detected, wherein the position relationship among the characteristic points is the corresponding relationship among the intervals among the characteristic points of the pig nose, the pig eyes, the pig ears and the like; the suspect location data may be: and the identification system calculates the actual distance value between all the pig face characteristic points in the obtained pig face image information to be detected.
And S60, determining the authentication identity according to the comparison result between the to-be-detected position data and the standard position data.
Specifically, after acquiring to-be-detected position data among all pig face characteristic points in pig face image information to be detected, the identification system compares the to-be-detected position data with standard position data, then eliminates identification marks according to a comparison result, and sets the identification mark information left after elimination as the identification mark corresponding to the pig face area image to be detected; the elimination process of the authentication identity can be as follows: presetting the standard distance value as the sum of standard distance values between all the pig face characteristic points acquired by the actually measured pigs; after the position of the pig face characteristic points in the pig face image information to be detected is determined, calculating the sum of actual distance values between the pig face characteristic points in the pig face image information to be detected, then obtaining the difference value between the sum of the actual distance values and the sum of standard distance values, and removing the identification identity corresponding to the actual distance value of which the difference value is larger than a preset second legal value.
The identification system can identify the pig face by shooting the pig face, so that the problem that the identification of the pig body by using an electronic ear tag or ear tag can cause the body injury of the pig is solved, and the identification effect of the pig is improved; and when the identification identity obtained by the identification system through the image comparison is not unique, the identification identity is further removed through comparing the position relation of the characteristic points in the face image of the pig to be detected, so that the possibility that the identification fails due to the fact that the identity of the pig cannot be accurately positioned through the image comparison is reduced, and the identification effect of the identity of the pig is further improved.
In one embodiment, after the identification identity is removed by comparing the position relation of the feature points in the face image of the pig to be detected, the situation that the identification identity is not unique and the identification of the pig only fails can still exist; after determining the authentication identity according to the comparison result between the to-be-detected location data and the standard location data at S60, the following steps may be further performed:
if the remaining identification identifiers are still not unique after the identification identifiers are removed by comparing the position relation of the characteristic points in the pig face image to be detected, the identification system continues to acquire the skin color information to be detected corresponding to the pig face area image to be detected, the skin color information to be detected is set to be the same as the standard skin color information, and the skin color information to be detected can be information formed by combining one or more of hue, lightness and purity in the image; then the identification system can compare the skin color information to be detected with the standard skin color information, eliminates the identification identity corresponding to the standard skin color information inconsistent with the skin color information to be detected, and sets the residual identification identity information after elimination as the identification identity corresponding to the face area image of the pig to be detected. By adding the skin color information identification mode, the possibility that the identification system cannot identify by using images or position information due to slight difference of skin colors among partial pigs is reduced, and therefore the identification effect of the pigs is further improved.
In one embodiment, as shown in fig. 2, consider the situation that the skin color information is inaccurate due to impurities such as sludge adhered to the face of the pig only during the feeding or activity process, and then the recognition result of the pig face is affected; the step of acquiring the skin color information to be detected corresponding to the image of the pig face area to be detected by the identification system can be specifically executed as follows:
the method comprises the steps of firstly identifying pig ears and characteristic point images corresponding to pig eyes in a pig face area image to be detected, then determining an enclosing area formed by the pig ears and the characteristic point images corresponding to the pig eyes by taking the two pig eyes and the two pig ears as boundaries, wherein the enclosing area is located between the two pig eyes and the two pig ears, and then setting skin color information corresponding to the enclosing area as skin color information to be detected. Because the position of the surrounding area is the position of the top of the pig face, the area of the top of the pig head belongs to an area which is not easy to be polluted in the process of feeding or moving the pig; therefore, the surrounding area positioned at the top of the head is determined according to the pig eyes and the pig ears, the skin color information corresponding to the surrounding area is set as the skin color information to be detected, the influence of impurities such as sludge adhered to the face of the pig on the skin color information is reduced, and the accuracy of the pig face recognition result is further improved.
In one embodiment, considering that impurities such as adhered sludge may still exist in the surrounding area located at the top of the pig head, which results in inaccurate identification result, the step of setting the skin color information corresponding to the surrounding area as the skin color information to be detected may be specifically performed as: the identification system firstly determines a sludge area in the surrounding area, the identification system can determine the position of the sludge area according to the characteristic that impurities such as sludge are adhered to the surface of the skin and the sludge and the skin are positioned on different planes, then the sludge area is removed from the surrounding area, and skin color information corresponding to the remaining surrounding area after the sludge area is removed is set as skin color information to be detected; the arrangement of the sludge removing area reduces the influence of the sludge on the skin color information to be detected, further reduces the possibility that a small amount of sludge still exists in the surrounding area to influence the identification result of the pig, and further improves the accuracy of the identification result of the pig.
In an embodiment, considering that as the pig grows continuously, the face of the pig may gradually change greatly, which may result in that the originally acquired standard region image may no longer be suitable, after the remaining authentication identity information after the elimination is set as the authentication identity corresponding to the face region image of the pig to be detected, the following steps may also be performed:
the identification system adds a pig face region image to be detected in the pig face image information into a standard region image corresponding to the identification identity, and replaces standard position data between pig face characteristic points corresponding to the identification identity with to-be-detected position data between pig face characteristic points in the pig face image information to be detected; also obtain the identification result at every turn after, will wait to examine the pig face regional image and wait to examine original comparison data such as position data with this identification result and add into pig identity data in, update original pig identity data, make the standard data that corresponds with pig identity can be at the in-process of actual discernment, update in real time according to the result of discernment, thereby reduced along with the continuous growth of pig, great change appears gradually in the face of pig, lead to the possibility that the standard regional image of original acquisition is no longer suitable for, the stability of pig identification system has been promoted.
In one embodiment, the condition that standard data stored in pig identity data is increased continuously along with the continuous identification process is considered, so that storage pressure is brought to an identification system; after the pig face area image to be detected in the pig face image information is added into the standard area image corresponding to the identification identifier, the following steps can be executed:
the identification system adds the pig face region image to be detected to the standard region image and records the corresponding recording time point when the storage action occurs, and when the time difference value between the recording time point corresponding to a certain pig face region image to be detected in the pig identity data and the real time point is greater than the preset updating value, the pig face region image to be detected is moved out of the standard region image; for example, if the preset update value is 10 days, only the original preset standard region image of the pig is stored in the pig identity data, and the face region image of the pig to be detected, which is obtained in the process of identifying the pig by the identification system in the last 10 days, is removed, so that the face region image of the pig to be detected, which is far away from the current time point and has no identification value, is removed, and the storage pressure of the identification system is relieved; meanwhile, the number of the images of the face area to be detected is reduced, and the efficiency of the identification system for identifying the identity of the pig is improved.
The implementation principle of the embodiment of the application is as follows: the identification system can identify the pig face by shooting the pig face, so that the problem that the identification of the pig body by using an electronic ear tag or ear tag can cause the body injury of the pig is solved, and the identification effect of the pig is improved; and when the identification identity obtained by the identification system through the image comparison is not unique, the identification identity is further removed through comparing the position relation of the characteristic points in the face image of the pig to be detected, so that the possibility that the identification fails due to the fact that the identity of the pig cannot be accurately positioned through the image comparison is reduced, and the identification effect of the identity of the pig is further improved.
Fig. 1 is a schematic flow chart of a pig face identification method in an embodiment. It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows; the steps are not limited to be performed in the exact order disclosed, and steps may be performed in other orders, unless explicitly stated otherwise; and at least some of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
Based on the method, the embodiment of the application also discloses a pig face identification system.
As shown in fig. 3, the apparatus includes the following modules:
the image information acquiring module 301 is configured to acquire pig face image information to be detected sent by the image capturing device, where the pig face image information includes pig face feature point images such as pig noses, pig eyes, and pig ears;
the to-be-detected region determining module 302 is configured to determine a to-be-detected pig face region image in the to-be-detected pig face image information according to a pig face feature point image in the to-be-detected pig face image information;
the identity data acquisition module 303 is configured to acquire preset pig body identification data, where the pig body identification data includes actual identification marks of all pigs, standard pig face area images corresponding to the actual identification marks, and standard position data between pig face feature points corresponding to the actual identification marks;
the pig body identification module 304 is used for comparing the similarity of the to-be-detected pig face region image with the standard pig face region image, and setting an actual identity corresponding to the standard pig face region image with the similarity larger than a preset first legal value as an identification identity corresponding to the to-be-detected pig face region image;
the position data acquiring module 305 is configured to acquire position data to be detected among the pig face feature points in the pig face image information to be detected if the identification identity corresponding to the pig face region image to be detected is not unique;
the pig only identity determining module 306 is configured to remove the identification identifier according to a comparison result between the to-be-detected position data and the standard position data, and set the remaining identification identifier information after removal as the identification identifier corresponding to the face region image of the pig to be detected.
In one embodiment, the standard location data includes standard distance values between the various pig face feature points; the pig only identity determining module 306 is further configured to calculate an actual distance value between each pig face feature point in the pig face image information to be detected, and set the actual distance value as position data to be detected; and comparing the actual distance value corresponding to the to-be-detected position data with the standard distance value corresponding to the standard position data to obtain a difference value between the actual distance value and the standard distance value, and eliminating the authentication identity corresponding to the actual distance value of which the difference value is greater than a preset second legal value.
In one embodiment, the pig-only data further includes standard skin color information corresponding to the actual identification; the pig only identity determining module 306 is further configured to obtain skin color information to be detected corresponding to the face region image of the pig to be detected if the remaining identification identifiers after the removing are still not unique; and comparing the skin color information to be detected with standard skin color information, eliminating the identification identity corresponding to the standard skin color information inconsistent with the skin color information to be detected, and setting the residual identification identity information after elimination as the identification identity corresponding to the face area image of the pig to be detected.
In one embodiment, the pig only identity determination module 306 is further configured to identify a feature point image corresponding to a pig ear and a pig eye in the pig face region image to be detected; determining an enclosed area formed by characteristic point images corresponding to pig ears and pig eyes; and setting the skin color information corresponding to the surrounding area as skin color information to be detected.
In an embodiment, the pig identity determining module 306 is further configured to determine a mud area in the enclosing area, remove the mud area in the enclosing area, and set skin color information corresponding to the enclosing area from which the mud area is removed as skin color information to be detected.
In one embodiment, as shown in fig. 4, the pig face recognition system further includes an identity data updating module 307, configured to add the pig face area image to be detected in the pig face image information to the standard area image corresponding to the identification mark; and replacing the standard position data between the pig face characteristic points corresponding to the identification identity with the to-be-detected position data between the pig face characteristic points in the pig face image information to be detected.
In one embodiment, the identity data updating module 307 is further configured to record a recording time point when the pig face region image to be detected is added to the standard region image; and when the time difference value between the recording time point and the real time point is greater than a preset updating value, moving the pig face area image to be detected corresponding to the recording time point out of the standard area image.
The embodiment of the application also discloses identification equipment.
In particular, the identification device comprises a memory and a processor, the memory having stored thereon a computer program that can be loaded by the processor and that executes the above-mentioned pig face identification method.
The embodiment of the application also discloses a computer readable storage medium.
In particular, the computer readable storage medium, which stores a computer program that can be loaded by a processor and executes the above pig face identification method, includes, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present embodiment is only for explaining the present invention, and it is not limited to the present invention, and those skilled in the art can make modifications of the present embodiment without inventive contribution as needed after reading the present specification, but all of them are protected by patent law within the scope of the claims of the present invention.

Claims (10)

1. A pig face identification method, the method comprising:
acquiring pig face image information to be detected sent by image shooting equipment, wherein the pig face image information comprises pig face characteristic point images of pig noses, pig eyes, pig ears and the like;
determining a pig face area image to be detected in the pig face image information according to the pig face characteristic point image in the pig face image information to be detected;
acquiring preset pig identity data, wherein the pig identity data comprises actual identity marks of all pigs, standard pig face area images corresponding to the actual identity marks and standard position data between pig face characteristic points corresponding to the actual identity marks;
carrying out similarity comparison on the to-be-detected pig face region image and the standard pig face region image, and setting an actual identity corresponding to the standard pig face region image with the similarity larger than a preset first legal value as an identification identity corresponding to the to-be-detected pig face region image;
if the identification identity corresponding to the face region image to be detected is not unique, acquiring position data to be detected among all face characteristic points in the face image information of the pig to be detected;
and rejecting the identification according to a comparison result between the position data to be detected and the standard position data, and setting the information of the identification which is left after rejection as the identification corresponding to the image of the face area of the pig to be detected.
2. The method of claim 1,
the standard position data comprises standard distance values between all pig face characteristic points;
the removing the identification mark according to the comparison result between the to-be-detected position data and the standard position data comprises the following steps:
calculating actual distance values among all pig face characteristic points in the pig face image information to be detected, and setting the actual distance values as position data to be detected;
and comparing the actual distance value corresponding to the to-be-detected position data with the standard distance value corresponding to the standard position data to obtain a difference value between the actual distance value and the standard distance value, and eliminating the identification identity corresponding to the actual distance value of which the difference value is greater than a preset second legal value.
3. The method of claim 1, wherein the pig identity data further comprises standard skin tone information corresponding to an actual identification;
the remaining authentication identity information after will rejecting sets up to the authentication identity who corresponds with waiting to examine pig face region image, includes:
if the identification identity mark remained after the elimination is not unique, obtaining the skin color information to be detected corresponding to the face region image of the pig to be detected;
and comparing the skin color information to be detected with the standard skin color information, eliminating the identification identity corresponding to the standard skin color information inconsistent with the skin color information to be detected, and setting the residual identification identity information after elimination as the identification identity corresponding to the face area image of the pig to be detected.
4. The method according to claim 3, wherein the acquiring skin color information to be detected corresponding to the image of the face area of the pig to be detected comprises:
identifying characteristic point images corresponding to pig ears and pig eyes in the pig face area image to be detected;
determining an enclosed area formed by characteristic point images corresponding to pig ears and pig eyes;
and setting the skin color information corresponding to the surrounding area as the skin color information to be detected.
5. The method according to claim 4, wherein the setting the skin color information corresponding to the enclosing region as the skin color information to be checked comprises:
and determining a mud area in the surrounding area, removing the mud area in the surrounding area, and setting skin color information corresponding to the surrounding area after the mud area is removed as the skin color information to be detected.
6. The method according to claim 3, wherein after the step of setting the identification information left after the removing as the identification corresponding to the face region image of the pig to be detected, the method further comprises the following steps:
adding a pig face area image to be detected in the pig face image information into a standard area image corresponding to an identification identity;
and replacing the standard position data between the pig face characteristic points corresponding to the identification identity with the to-be-detected position data between the pig face characteristic points in the pig face image information to be detected.
7. The method of claim 6, further comprising, after the adding the pig face region image to be examined in the pig face image information to the standard region image corresponding to the authentication identity:
recording a recording time point when the pig face area image to be detected is added to the standard area image;
and when the time difference value between the recording time point and the actual time point is greater than a preset updating value, moving the pig face area image to be detected corresponding to the recording time point out of the standard area image.
8. A pig face identification system, the system comprising:
the image information acquisition module (301) is used for acquiring the pig face image information to be detected sent by the image shooting equipment, wherein the pig face image information comprises pig face characteristic point images such as pig noses, pig eyes and pig ears;
the to-be-detected region determining module (302) is used for determining a to-be-detected pig face region image in the to-be-detected pig face image information according to the pig face characteristic point image in the to-be-detected pig face image information;
the identity data acquisition module (303) is used for acquiring preset pig identity data, wherein the pig identity data comprise actual identity marks of all pigs, standard pig face area images corresponding to the actual identity marks and standard position data between pig face characteristic points corresponding to the actual identity marks;
the pig body identification module (304) is used for comparing the similarity of the to-be-detected pig face region image with the standard pig face region image, and setting an actual identity corresponding to the standard pig face region image with the similarity larger than a preset first legal value as an identification identity corresponding to the to-be-detected pig face region image;
the position data acquisition module (305) is used for acquiring to-be-detected position data among all pig face characteristic points in the pig face image information if the identification identity corresponding to the pig face area image to be detected is not unique;
and the pig only identity determining module (306) is used for removing the identification according to the comparison result between the position data to be detected and the standard position data, and setting the residual identification information after removal as the identification corresponding to the face region image of the pig to be detected.
9. An identification device comprising a memory and a processor, the memory having stored thereon a computer program which can be loaded by the processor and which can carry out the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which can be loaded by a processor and which executes the method of any one of claims 1 to 7.
CN202111309640.7A 2021-11-06 2021-11-06 Pig face identification method, pig face identification system, pig face identification equipment and storage medium Withdrawn CN114049653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111309640.7A CN114049653A (en) 2021-11-06 2021-11-06 Pig face identification method, pig face identification system, pig face identification equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111309640.7A CN114049653A (en) 2021-11-06 2021-11-06 Pig face identification method, pig face identification system, pig face identification equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114049653A true CN114049653A (en) 2022-02-15

Family

ID=80207431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111309640.7A Withdrawn CN114049653A (en) 2021-11-06 2021-11-06 Pig face identification method, pig face identification system, pig face identification equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114049653A (en)

Similar Documents

Publication Publication Date Title
CN110705405B (en) Target labeling method and device
US20110158540A1 (en) Pattern recognition method and pattern recognition apparatus
CN111639629B (en) Pig weight measurement method and device based on image processing and storage medium
CN111339979B (en) Image recognition method and image recognition device based on feature extraction
CN110458007B (en) Method, device, computer equipment and storage medium for matching human faces
US8605962B2 (en) Pattern matching system, pattern matching method, and pattern matching program
CN115171361B (en) Dangerous behavior intelligent detection and early warning method based on computer vision
KR20110103223A (en) Keypoint matching system and method using sift algorithm for the face recognition
US20220401825A1 (en) Alarm method and apparatus for tabletop game, electronic device and storage medium
CN114049653A (en) Pig face identification method, pig face identification system, pig face identification equipment and storage medium
CN110889326B (en) Human body detection-based queue-jumping behavior monitoring and warning system, method, device and storage medium
CN109544514B (en) Sawn timber identity identification method, device and equipment integrating apparent features
CN115830722A (en) Living body identification people and certificate comparison method
CN111241930A (en) Method and system for face recognition
CN111126286A (en) Vehicle dynamic detection method and device, computer equipment and storage medium
CN116228661A (en) Cloth flaw online detection method and system
CN107403429B (en) Method for quickly and automatically acquiring parameters of periodic sequence image model
CN113553965B (en) Person identity recognition method combining face recognition and human body recognition
CN115331193A (en) Parking space identification method, parking space identification system, electronic equipment and storage medium
CN110210441B (en) Pigeon eye pattern auditing system
CN112215113A (en) Face recognition method and device
CN114005060A (en) Image data determining method and device
CN113762745A (en) Live pig body shape assessment method and device based on machine vision
CN112967224A (en) Electronic circuit board detection system, method and medium based on artificial intelligence
CN112784713A (en) Pig weight estimation method, system, equipment and storage medium based on image

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220215