WO2018094892A1 - 宠物类型识别的方法、装置及终端 - Google Patents

宠物类型识别的方法、装置及终端 Download PDF

Info

Publication number
WO2018094892A1
WO2018094892A1 PCT/CN2017/074840 CN2017074840W WO2018094892A1 WO 2018094892 A1 WO2018094892 A1 WO 2018094892A1 CN 2017074840 W CN2017074840 W CN 2017074840W WO 2018094892 A1 WO2018094892 A1 WO 2018094892A1
Authority
WO
WIPO (PCT)
Prior art keywords
pet
matching
image
feature
type
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.)
Ceased
Application number
PCT/CN2017/074840
Other languages
English (en)
French (fr)
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 Water World Co Ltd
Original Assignee
Shenzhen Water World 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 Water World Co Ltd filed Critical Shenzhen Water World Co Ltd
Publication of WO2018094892A1 publication Critical patent/WO2018094892A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01KANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
    • A01K29/00Other apparatus for animal husbandry

Definitions

  • the present invention relates to the field of image recognition technology, and in particular, to a method, device and terminal for pet type identification.
  • Pets generally refer to animals that people support to eliminate loneliness or for entertainment purposes. Pets are animals and plants that are raised for spiritual purposes. Generally, in order to eliminate loneliness, or to be recreational, it is usually a mammal or avian animal, because these animals have a relatively developed brain and are easy to communicate with people.
  • a main object of the present invention is to provide a method, device and terminal for pet type identification, which help a user to identify a type of pet.
  • the present invention provides a method for pet type identification, comprising: acquiring a pet image; extracting a plurality of physical features of the pet according to the pet image; and integrating a plurality of physical characteristics of the pet with a pet body feature database The data is matched to get the matching pet type.
  • the capturing the pet image by a camera comprises: [0008] The pet is photographed by a camera to obtain an initial pet image.
  • the method further includes:
  • the extracting the plurality of physical features of the pet according to the pet image comprises: extracting an overall outline of the pet from the pet image; and locating the face, the trunk, the tail and the limbs from the overall contour of the pet a location area; extracting facial features, torso features, tail features, and limb features of the pet, respectively, in the location areas of the face, torso, tail, and limbs, the facial features including eye features, mouth features, nose features , ear features, and facial contours; combining the pet's facial features, torso features, tail features, and limb features to form a pet body feature set, each feature including two parameters, color and shape.
  • the data in the pet body feature database comprises: a matching image set of a plurality of pet types, and the matching image set of each pet type includes one or more preset pet matching images, including one The pet matching image carrying the pet type tag is recorded as a representative pet image; the reference pet body feature set extracted from each of the pet matching images, wherein the reference pet body feature set includes the pet matching a plurality of features of the pet in the image; a set of distinguishing features corresponding to a set of matching images of each pet type, the set of distinguishing features representing one or more distinguishing features of a certain type of pet, the distinguishing feature being used for A feature that distinguishes this type of pet from other types of pets.
  • the matching the pet body feature set with the data in the pet body feature database to obtain a matched pet type comprises: determining whether the pet body feature set includes a distinguishing feature set; The set determines whether the included difference feature set is more than one; if yes, the included difference feature set is recorded as a screening difference feature set, and the plurality of screening difference feature sets are screened by a matching mechanism to obtain a match a pet type; if a difference feature set is included, acquiring a pet type tag of a matching image set of a pet type corresponding to the difference feature set, to obtain a matched pet type.
  • the screening the plurality of screening difference feature sets by using a matching mechanism to obtain a matched pet type includes: obtaining a screening matching image of a pet type corresponding to the screening difference feature set. Collecting all the pet images in the screening matching image set to obtain a reference pet body feature set corresponding to each pet image; and selecting the features in the pet body feature set and the retrieved reference pet body feature set The features in the comparison are calculated one by one, and the matching degree of the pet body feature set with each of the retrieved reference pet body feature sets is calculated; by matching all the pet body feature sets and each call according to the screening matching image set a matching degree of the reference pet body feature set, calculating a matching degree of the feature in the pet body feature set and the retrieved reference pet body feature set, and calculating the screening matching image set and the pet body feature set The average of the matching degree is obtained as the overall matching degree of the pet image and the pet type; the pet matching type corresponding to the pet body feature set having the highest overall matching degree is used as the matching pet type.
  • the present invention also provides a pet type identification device, comprising: an acquisition module, configured to acquire a pet image; a feature extraction module, configured to extract a physical feature of the pet according to the pet image; a matching module, configured to The plurality of physical characteristics of the pet are matched with data in the pet body feature database to obtain a matching pet type.
  • the present invention also provides a terminal, including a processor and a memory; the memory is configured to store a program for performing the pet type identification method of any one of the above; the processor is configured to perform the A program stored in memory.
  • the pet type identification method, device and terminal according to the present invention in which the smart terminal acquires a pet image; extracts a plurality of physical features of the pet according to the pet image; and sets a plurality of physical features of the pet with the pet
  • the data in the body characteristics database is matched to obtain the matching pet type, which enables the user to quickly know the type of the pet, improve the understanding of the pet, and help the user to select his favorite pet.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for pet type identification according to the present invention
  • FIG. 2 is a schematic diagram of data types in a pet body feature database of a pet type identification method according to the present invention
  • FIG. 3 is a schematic structural diagram of a first embodiment of a device for identifying a pet type according to the present invention.
  • FIG. 4 is a schematic structural diagram of a second embodiment of a device for pet type identification according to the present invention.
  • FIG. 5 is a schematic structural diagram of a third embodiment of a device for pet type identification according to the present invention.
  • FIG. 6 is a schematic structural diagram of a fifth embodiment of a device for pet type identification according to the present invention.
  • FIG. 7 is a schematic structural diagram of a sixth embodiment of a device for pet type identification according to the present invention.
  • FIG. 8 is a conceptual analysis diagram of a pet type identification method according to the present invention.
  • the present invention provides a method for pet type identification.
  • the method for identifying a pet type can be applied to a control terminal.
  • the control terminal can be, but not limited to, a tablet computer, a mobile phone, or other smart device.
  • This embodiment and the following embodiments are described by taking a mobile phone as an example.
  • the image recognition process generally uploads an image to a server via a mobile phone, and the server parses it to obtain the result and then transmits the result back to the mobile phone.
  • Figure 1 is a flow chart showing a first embodiment of a method for identifying a pet type according to the present invention.
  • the method for pet type identification proposed by the present invention comprises the following steps:
  • the pet image is first acquired, and the image can be acquired by photographing the mobile phone, or by importing an image inside the mobile phone or loading an image on the network.
  • step S20 the physical characteristics of the pet can be extracted by existing recognition techniques.
  • step S30 a large number of types of pet data are stored in the pet body feature database.
  • a certain type of pet also stores a large amount of individual pet characteristic information.
  • the database counts the arrangement of a certain feature of a certain type of pet. If the feature is highly discrete, it indicates that the feature is not a distinguishing feature of the pet. If the feature is matched, the weight ratio is negligible. Or the proportion is small; if the feature is small in dispersion, it indicates that the feature is a distinguishing feature of the pet of the type, and then the feature is in the matching calculation, and the weight is occupied. rather big.
  • the specific weights vary depending on the type of pet.
  • the pet X includes the distinguishing feature A and the distinguishing feature B, the distinguishing feature A belongs to the type A pet, and the distinguishing feature B belongs to the B type pet.
  • the device can analyze whether other features of the pet X fall within the range of the A type or B type pet. If only the A type matches and the B type does not match, the A type pet picture and name are preferentially transmitted.
  • the pet body feature set is matched with the pet body feature database in such a manner that each feature variable in the pet body feature set is matched with each type of pet feature data in the pet body feature database one by one to obtain a matching result.
  • the matching result may be output to the user to inform the user of the matching pet type.
  • the result of the output may be a pet type name, a picture or a set of pictures of the type of pet.
  • the selected image is from the pet database, which contains the pet image of the corresponding feature in the pet's physical characteristics database.
  • the selected picture is generally the same as the action of the pet in the image to be recognized.
  • the output can be a single result, but is not limited to a single result.
  • the judgment result may be sequentially output according to the degree of matching, and the matching degree is high, and the user is not satisfied with the result to switch to the result of the lower matching degree.
  • Step S10 includes:
  • S101 photographing a pet by a camera to obtain an initial pet image
  • S103 Determine whether the displacement information is within a set tolerance threshold value that is allowed to be recognized, and determine that the displacement information is within the displacement threshold range, and use the initial pet image as a pet image.
  • step S101 in this scenario, the user photographs the pet through the mobile phone to obtain an image of the pet.
  • the identification device can read the model of the camera as well as the imaging conditions. Imaging conditions include pixel values, ISO sensitivity
  • the identification device optimizes the image according to the model model and imaging conditions of the specific model, so that the pet image data is closer to the actual value.
  • steps S102 and S103 the user sees a favorite pet, and the mood is more exciting.
  • the hand may not be able to smoothly capture the pet image because of the excitement.
  • the method of this embodiment can detect whether the user is photographed, whether the hand shake is excessive, and the captured pet image cannot be used to identify the pet. Types of.
  • the specific method is to obtain the device position information of the pet image by using a three-axis gyroscope or other related position, and record the position information before imaging (x., y., zo), after imaging.
  • the position information is ( X l , yi , Z l ), and the displacement information can be calculated.
  • step S20 includes:
  • S22 locating a location area of the face, the trunk, the tail, and the limbs from the overall contour of the pet; [0048] S23, respectively extracting pets in the location areas of the face, the trunk, the tail, and the limbs Facial features
  • the facial features including eye features, mouth features, nose features, ear features, and facial contours.
  • the identification of the pet profile is achieved by establishing a neural network model.
  • the device can discern the difference between the pet and the background in the pet image, and then find the outline of the pet.
  • the identification device can recognize the facial contour of the pet. According to the difference between the color of the pet's face and the color of the environment, the environmental parameters of the surrounding environment are judged. The overall contour of the pet is identified in conjunction with the in-contour color of the face and the environmental parameters. For example, to identify the environment in which a cat is located, on the sheets or on the floor, on the grass or on the road.
  • the overall outline of the pet obtained after subtracting the background is not a real pet outline, but also includes a partial background, which can be retained by the pet body contour positioning model, retaining a reasonable contour portion.
  • the outline of the pet is divided into four regions: a head, a trunk, a limb and a tail. Due to the angle of imaging, the features of the limbs and tail may not be noticeable in the image. In the statistical feature, the two features may be ignored according to actual conditions.
  • the characteristics of the head include the shape of the ear, the color of the ear, the size of the ear relative to the face, the position of the ear, etc.; the shape of the eye, the position of the eye relative to the face Size, eye color, eye position, etc.; nose shape, nose size relative to face, nose color, nose position on face, etc.; mouth shape, mouth size relative to face, mouth color, mouth in The position of the face; the size of the face relative to the torso, the color of the face, the shape of the face, etc.
  • the characteristics of the trunk mainly include the size of the trunk relative to the head, the color and color distribution of the trunk, and the like.
  • the features of the limbs mainly include leg length, leg color, leg thickness, and the like.
  • the characteristics of the tail mainly include the length of the tail, the color of the tail and the thickness of the tail.
  • the tail often cannot appear completely in the image, so the device can intelligently screen the distinguishable features.
  • each feature is represented by a variable. All pet features on the pet image are extracted, and all features are grouped into a pet body feature set. However, not every feature can be extracted during the extraction process. In this case, in the pet body feature set, the value of the variable representing the feature that cannot be extracted is recorded as 0.
  • the present invention also proposes a fourth embodiment of the method for pet type identification, which is different from the third embodiment of the method for pet type identification.
  • the data in the pet body feature database in step S30 includes:
  • a matching image set 301 of a plurality of pet types includes one or more preset pet matching images, including a pet matching image carrying a pet type tag, To represent the pet image;
  • a reference pet body feature set 302 extracted from each of the pet matching images, wherein the reference pet body feature set includes a plurality of features of the pet in the pet matching image;
  • the pet body feature database includes feature data of a plurality of pet types, and the feature data of each pet type is further divided into three data types, which are respectively a matching image set, and a reference pet body feature set. And distinguish feature sets.
  • the matching image set 301 refers to a set of images of a certain pet type, such as for a Persian cat, the Pet Body Feature Database stores a collection of Persian cats. In order to prevent the data from being excessively fitted to a specific pet individual, the pet image of a pet individual does not exceed three.
  • the reference pet body feature set 302 refers to a set of pet body features corresponding to the pictures stored in each database. For the extraction of the pet's physical characteristics, the methods of the second embodiment and the third embodiment can be referred to.
  • the difference feature set 303 refers to a feature set of a type for distinguishing pets of this type from other types of pets. By collecting this type of pet image, the physical characteristics of each pet image are extracted, and the arrangement of each physical feature is counted. In the distinguishing feature set 303, important distinguishing features and general distinguishing features can be distinguished. In practical situations, it can be defined that more than 80% of the pet images have pet characteristics that are important distinguishing features, and more than 60% but less than 80% of pet images have pet features set to the general distinguishing feature.
  • multiple data ranges can be set and different weights can be set for different data ranges, for example, a feature is divided into three data ranges [0, 1], (1, 2), (2,3], [0,1] has a weight of 0.8, (1,2) has a weight of 0.6, and (2,3) has a weight of 0.4.
  • a weight of 0.8 indicates that the type is >80 ⁇ 3 ⁇ 4 Pet images have this feature.
  • Step S30 further includes:
  • S31 Determine whether the pet body feature set includes a difference feature set.
  • the included difference feature set is recorded as a screening difference feature set, and the plurality of screening difference feature sets are screened by using a matching mechanism to obtain a matched pet type;
  • step S34 If a difference feature set is included, acquire a pet type tag of a matching image set of a pet type corresponding to the difference feature set, to obtain a matched pet type.
  • the pet body feature set is ⁇ ai , a 2 , a 3 ... a n ⁇ , and is recorded as set eight.
  • a certain type of distinguishing feature set is ⁇ , ⁇ , ⁇ 2 ⁇ , ⁇ 3 ⁇ , denoted as set X, where it is assumed that the distinguishing feature set X includes only three distinct features.
  • Another type of distinguishing feature set Q is ⁇ Qi ⁇ , ⁇ Q 2 ⁇ , where it is assumed that the distinguishing feature set Q includes only two distinct features.
  • Set & 1 , &2 , &3 respectively correspond to ⁇ 1 ⁇ , ⁇ X 2 ⁇ , ⁇ X 3 ⁇ , and & 4 , & 5 correspond to ⁇ 0 1 ⁇ , ⁇ Q 2 ⁇ respectively. If a!eiX! ⁇ , a 2 e ⁇ X 2 ⁇ , a 3 e ⁇ X 3 ⁇ , it can be judged that the set A contains the distinguishing feature set X. If a ⁇ iQ i ⁇ , a 5 e ⁇ Q 2 ⁇ , then the judgment set A contains the difference feature set 0. If the subset X n in the distinguishing feature set X does not include the corresponding feature element a n of the set A, it can be determined that the set A does not include the distinguishing feature set X.
  • this step is a processing method for judging that different results appear. If set A does not contain any distinct feature set, the match is unsuccessful and the unrecognized result is output. If the set A contains a set of distinguishing features, a pet representative image of the pet type corresponding to the set of distinguishing features is output. Click on the pet representative image to load the corresponding matching pet image set, which is convenient for the user to view the characteristics of different individuals of the pet type and increase the understanding of the pet of the type. If the set A includes a plurality of different feature sets, the screening result is further screened, and the matching degree of each difference feature set is obtained, and the matching result is output according to the matching degree.
  • the present invention also proposes a sixth embodiment of the method for pet type identification, which is different from the fifth embodiment of the method for pet type identification.
  • step S33 the plurality of screening difference feature sets are screened by using a matching mechanism to obtain a matched pet type, including:
  • S332 Retrieve all the pet images in the image matching set in the screening with each of the pet types, and obtain a reference pet body feature set corresponding to each pet image;
  • S333 Compare the features in the pet body feature set with the features in the retrieved reference pet body feature set, and calculate the pet body feature set and each referenced pet body. The matching degree of the feature set;
  • steps S331 and S332 if the pet types corresponding to the screening difference feature set are B, C, and D, the pet image sets corresponding to the pet types B, C, and D are retrieved, and B, C, and D are retrieved.
  • Reference pet body feature set B i , b 2 , ...b n ⁇ , t is a positive integer, and the value ranges from [1, n].
  • step S333 the set A is compared with B i, B 2 , ... B n , respectively, and the corresponding matching degrees ⁇ , , ⁇ 2 , ... ⁇ ⁇ are calculated. Then the pet type ⁇ overall matching degree ⁇ can be obtained by solving the average of ⁇ ⁇ , ⁇ 2 , ... ⁇ ⁇ . Similarly pet type C can be obtained as a whole matching degree ⁇ c and pet overall matching type D ⁇ D.
  • steps S334 and S335 the corresponding pet representative image is sequentially output according to the magnitude of the overall matching degree.
  • the pet type with the highest overall matching is displayed first. Click on the pet representative image to load the corresponding matching pet image set. Assuming that the overall matching degree ⁇ B is the highest, the user can view a plurality of B-type pet images in the pet image set B, and intuitively compare with the real-life pets to obtain his own judgment result.
  • FIG. 3 is a schematic structural diagram of a first embodiment of a device for pet type identification according to the present invention.
  • the present invention provides a device for pet type identification, comprising:
  • the obtaining module 10 is configured to acquire a pet image.
  • a feature extraction module 20 configured to extract a physical feature of the pet according to the pet image
  • the matching module 30 is configured to match the plurality of physical features of the pet with data in the pet body feature database to obtain a matched pet type.
  • the first is to acquire a pet image, which can be acquired by shooting on a mobile phone, or by importing an image inside the mobile phone or loading an image on the network.
  • the feature extraction module 20 is implemented by establishing a neural network model. Through a large amount of picture training, the device can discern the difference between the pet and the background in the pet image, and then find the outline of the pet.
  • the outline of the pet is divided into four areas: the head, the torso, the limbs and the tail. Due to the angle of imaging, the features of the limbs and tail may not be noticeable in the image. In the statistical feature, the two features may be ignored according to actual conditions. [0089] It is most important to identify the characteristics of the head.
  • the characteristics of the head include the shape of the ear, the color of the ear, the size of the ear relative to the face, the position of the ear, the shape of the eye, the size of the eye relative to the face, the color of the eye, the eye. In the face position; nose shape, size of the nose relative to the face, nose color, nose position on the face; mouth shape, mouth size relative to the face, mouth color, mouth position on the face; face relative The size of the torso, face color, face shape.
  • the characteristics of the torso mainly include the size of the trunk relative to the head, the color and color distribution of the torso.
  • the features of the limbs mainly include leg length, leg color, and leg thickness.
  • the characteristics of the tail mainly include the length of the tail, the color of the tail and the thickness of the tail.
  • the tail often cannot appear completely in the image, so the device can intelligently screen the distinguishable features.
  • a large number of types of pet data are stored in the pet body feature database.
  • a certain type of pet also stores a large amount of individual pet characteristics.
  • the database counts the arrangement of a certain feature of a certain type of pet. If the feature is highly discrete, it indicates that the feature is not a distinguishing feature of the pet. If the feature is matched, the weight ratio is negligible. Or the proportion is small; if the feature is small, it indicates that the feature is a distinguishing feature of the pet of the type, and the feature has a large weight ratio in the matching calculation.
  • the specific weights vary depending on the type of pet.
  • the pet X includes the distinguishing feature A and the distinguishing feature B, and the distinguishing feature A belongs to the type A pet, and the distinguishing feature B belongs to the type B pet.
  • the device can analyze whether other features of the pet X fall within the range of the A type or the B type pet. If only the A type matches and the B type does not match, the A type pet picture and name are preferentially transmitted.
  • the output result is a pet type name, a certain picture or a picture set of the type of pet.
  • the selected image is from the pet database, which contains the pet image of the corresponding feature in the pet's body characteristics database.
  • the selected image is generally the same as the recognized image pet action.
  • the output can be a single result, but is not limited to a single result.
  • the judgment result may be sequentially output according to the level of the matching degree, and the matching degree is high, and the user may be switched to the result of the lower matching degree if the user is dissatisfied with the result.
  • FIG. 4 is a schematic structural diagram of a second embodiment of a device for pet type identification according to the present invention. Further, based on the first embodiment of the apparatus for pet type identification of the present invention, the present invention also proposes a second embodiment of the apparatus for pet type identification. Unlike the first embodiment of the apparatus for pet type identification, the acquisition module 10 further includes:
  • the image obtaining unit 101 is configured to capture a pet by a camera to obtain an initial pet image.
  • a displacement recording unit 102 configured to record device displacement information of the pet image ⁇ ;
  • the image sharpness determining unit 103 is configured to determine whether the displacement information is within a set tolerance threshold range that is allowed to be recognized, and after determining that the displacement information is within the displacement threshold range, the initial The pet image is used as a pet image.
  • the user photographs the pet through the mobile phone to obtain an image of the pet.
  • the identification device reads the camera model and imaging conditions. Imaging conditions include pixel values, ISO sensitivity, white balance parameters, and the like.
  • the identification device can optimize the image according to the model model and imaging conditions of the specific model, so that the pet image data is closer to the actual value.
  • the displacement recording unit 102 the user sees a favorite pet, and the mood is more exciting.
  • the mobile phone is photographed, the hand may not be able to smoothly capture the pet image because of the excitement.
  • the apparatus of this embodiment can detect whether the user's photographing is excessive or not, and the photographed pet image cannot be used to identify the pet type.
  • the specific device acquires the device position information of the pet image in the mobile phone by acquiring the accessory through a three-axis gyroscope or other related position, and records the position information before the imaging as (x) , y., zo), after the imaged position information is ( X l , y , , Z l ), the displacement information can be calculated. Specifically:
  • FIG. 5 is a schematic structural diagram of a third embodiment of a device for pet type identification according to the present invention. Further, based on the first embodiment of the device for pet type identification of the present invention, the present invention also proposes a third embodiment of the device for pet type identification, which is different from the first embodiment of the device for pet type identification.
  • the feature extraction module 20 includes: [0105] The overall contour extracting unit 21 is configured to extract an overall outline of the pet from the pet image;
  • a body position locating unit 22 configured to position a position area of the face, the trunk, the tail, and the limbs from the overall contour of the pet;
  • the feature extraction unit 23 is configured to extract a facial feature, a trunk feature, a tail feature, and a limb feature of the pet in the position regions of the face, the trunk, the tail, and the limbs, respectively, the facial feature including an eye feature , mouth features, nose features, ear features, and facial contours.
  • the identification of the pet outline is realized by establishing a neural network model.
  • the device can discern the difference between the pet and the background in the pet image, and then find the outline of the pet.
  • the identification device can recognize the contour of the pet's face.
  • the environmental parameters of the surrounding environment are judged based on the difference between the color of the pet's face and the color of the environment.
  • the overall contour of the pet is identified in conjunction with the in-contour color of the face and the environmental parameters. For example, to identify the environment in which a cat is located, on the sheets or on the floor, on the grass or on the road. After deducting the background, you can get the overall outline of the pet
  • the overall outline of the pet obtained after subtracting the background is not a true pet outline, but also includes a partial background, which can be retained by the pet body contour positioning model, retaining a reasonable contour portion.
  • the outline of the pet is divided into four regions: a head, a trunk, a limb and a tail. Due to the angle of imaging, the features of the limbs and tail may not be noticeable in the image. In the statistical feature, the two features may be ignored according to actual conditions.
  • the feature of the recognition head is most important, and the characteristics of the head specifically include the shape of the ear, the color of the ear, the size of the ear relative to the face, the position of the ear, etc.; the shape of the eye, the face relative to the face Size, eye color, eye position, etc.; nose shape, nose size relative to face, nose color, nose position on face, etc.; mouth shape, mouth size relative to face, mouth color, mouth Position at the face; size of the face relative to the torso, face color, face shape, etc.
  • the characteristics of the trunk mainly include the size of the trunk relative to the head, the color and color distribution of the trunk, and the like.
  • the characteristics of the limbs mainly include leg length, leg color, leg thickness, and the like.
  • the characteristics of the tail mainly include the length of the tail, the color of the tail and the thickness of the tail.
  • the tail often cannot appear completely in the image, so the device can intelligently screen the distinguishable features.
  • the pet's facial features, torso features, tail features, and limb features are combined to form a pet body feature set, each feature including two parameters, color and shape.
  • the present invention also proposes a fourth embodiment of the apparatus for pet type identification, which is different from the third embodiment of the apparatus for pet type identification.
  • the pet body feature database includes:
  • a matching image set 301 of a plurality of pet types includes one or more preset pet matching images, including a pet matching image carrying a pet type tag, To represent the pet image;
  • a reference pet body feature set 302 extracted from each of the pet matching images, wherein the reference pet body feature set includes a plurality of features of the pet in the pet matching image;
  • a distinguishing feature set 303 corresponding to a matching image set of each pet type, the distinguishing feature set representing one or more distinguishing features of a certain type of pet, the distinguishing feature being for the pet and other types of the pet The characteristics of the pet to distinguish.
  • the matching image set 301 refers to a set of images of a certain pet type, for example, for a Persian cat, the Pet Body Feature Database stores a collection of Persian cats. In order to prevent the data from being excessively fitted to a specific pet individual, the pet image of a pet individual does not exceed three.
  • the reference pet body feature set 302 refers to a set of pet body features corresponding to the pictures stored in each database.
  • the extraction of pet body characteristics can be referred to the methods of Example 2 and Example 3.
  • the difference feature set 303 refers to a feature set for a certain type of pet to distinguish from other types of pets. By collecting this type of pet image, the physical characteristics of each pet image are extracted, and the arrangement of each physical feature is counted. In the difference feature set 303, important distinguishing features can be distinguished, and the general area Do not feature. In practical situations, it can be defined that more than 80% of the pet images have a pet feature that is an important distinguishing feature, and a pet image that exceeds 60% but less than 80% has a pet feature set as a general distinguishing feature.
  • multiple data ranges can be set and different weights can be set for different data ranges, for example, a feature is divided into three data ranges [0, 1], (1, 2), (2,3], [0,1] has a weight of 0.8, (1,2) has a weight of 0.6, and (2,3) has a weight of 0.4.
  • a weight of 0.8 indicates that the type is >80 ⁇ 3 ⁇ 4 Pet images have this feature.
  • FIG. 6 is a schematic structural diagram of a fifth embodiment of a device for pet type identification according to the present invention. Further, based on the fourth embodiment of the apparatus for pet type identification of the present invention, the present invention further provides a fifth embodiment of the apparatus for recognizing pet type, which is different from the fourth embodiment of the apparatus for recognizing pet type
  • the matching module 30 includes:
  • the matching unit 31 is configured to determine whether the pet body feature set includes a difference feature set.
  • the result analyzing unit 32 is configured to: if the difference feature set is included, determine whether the included difference feature set is more than one;
  • the multiple result processing unit 33 is configured to: when the result analysis unit has multiple results, the included difference feature set is recorded as a screening difference feature set, and the multiple screening difference feature sets are screened by using a matching mechanism. Points, get the matching pet type;
  • the single result processing unit 34 is configured to obtain, for the result analysis unit, only one result, obtain a pet type flag of the matched image set of the pet type corresponding to the different feature set, and obtain a matched pet type.
  • the pet body feature set is ⁇ ai , a2 , a 3 ... a n ⁇ , and is denoted as a set eight.
  • a certain type of distinguishing feature set is ⁇ X , ⁇ , ⁇ X 2 ⁇ , ⁇ X 3 ⁇ , denoted as set X, and it is assumed here that the distinguishing feature set X includes only three distinct features.
  • Another type of distinguishing feature set Q is ⁇ ( ⁇ , ⁇ Q 2 ⁇ , where it is assumed that the distinguishing feature set Q includes only two distinct features.
  • the result analysis unit 32 if the set A does not contain any distinguishing feature set, the unrecognized knot is output. fruit.
  • the set A includes only one distinguishing feature set, and then the pet representative image of the pet type corresponding to the distinguishing feature set is output. Click on the pet representative image to load the corresponding matching pet image set, which is convenient for the user to view the characteristics of different individuals of the pet type and increase the understanding of the pet of the type.
  • the set A includes a plurality of different feature sets, and then the screening result is further used to further score the obtained results, and the matching degree of each different feature set is obtained, and the matching result is output according to the matching degree.
  • FIG. 7 is a schematic structural diagram of a sixth embodiment of a device for pet type identification according to the present invention. Further, based on the fifth embodiment of the apparatus for pet type identification of the present invention, the present invention also proposes a sixth embodiment of the apparatus for pet type identification, which is different from the fifth embodiment of the apparatus for pet type identification, and the result analysis
  • the matching mechanism in unit 33 includes:
  • a sub-unit 331 is configured to acquire a screening matching image set of a pet type corresponding to the screening difference feature set; and retrieve all pet images in the screening matching image set to obtain a corresponding image of each pet image Reference pet body feature set;
  • the matching sub-unit 332 is configured to compare the features in the pet body feature set with the features in the retrieved reference pet body feature set, and calculate the pet body feature set and each call.
  • the matching degree of the reference pet body feature set calculating the matching in the pet body feature set by matching the matching degree of each pet body feature set with each of the retrieved reference pet body feature sets according to the screening matching image set Calculating a matching degree of the feature and the retrieved reference pet body feature set, calculating an average value of the matching degree between the screening matching image set and the pet body feature set, and obtaining an overall matching degree as the pet image and the pet type;
  • the locating sub-unit 333 is configured to use the pet type corresponding to the pet body feature set with the highest overall matching degree as the matching pet type.
  • the pet image set corresponding to the pet types B, C, and D is retrieved, and B, C, and The set of reference pet body features corresponding to all pet images in the D pet image set.
  • pet type B as an example, if there are n pet images in pet type B, there are also n corresponding reference pet body feature sets, which are denoted as B 1 ; B 2 , . . . B n .
  • Reference pet body feature set B i , b 2 , . . . b n ⁇ , t is a positive integer with a range of [ 1, n].
  • the matching sub-unit 332 the set A is compared with B, B 2 , . . . B n respectively, and the corresponding matching degree ⁇ is calculated. , ⁇ 2 , ... ⁇ ⁇ . Then the pet type ⁇ overall matching degree ⁇ ⁇ can be obtained by solving the average value of ⁇ ⁇ , ⁇ 2 , ... ⁇ ⁇
  • pet type C can be obtained as a whole matching degree ⁇ c and pet overall matching type D ⁇ D.
  • the corresponding pet representative image is sequentially output according to the size of the overall matching degree.
  • the pet type with the highest overall matching is displayed first. Click on the pet representative image to load the corresponding matching pet image set. Assuming that the overall matching degree ⁇ B is the highest, the user can view a plurality of B-type pet images in the pet image set B, and intuitively compare with the real-life pets to obtain his own judgment result.
  • the present invention also provides a terminal, including a processor and a memory; the memory is configured to store a program for performing the pet type identification method of any one of the above; the processor is configured to perform the A program stored in memory.
  • the terminal may be one of a smart device such as a mobile phone, a tablet computer, a smart watch, a smart bracelet, or smart glasses.
  • the above terminal must carry a camera to obtain a pet image.
  • FIG. 8 is a conceptual analysis diagram of a pet type identification method according to the present invention.
  • the pet type identification method proposed by the present invention firstly determines the position of the pet (ie, the outline of the pet) through the training mechanism, and then divides the outline of the pet into four parts of the head, the trunk, the limbs, and the tail, and extracts the features of each part. Matches the data in the pet body feature database and outputs the matching result.

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Environmental Sciences (AREA)
  • Animal Husbandry (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明提出的宠物类型识别方法、装置及终端,其方法中,智能终端获取宠物图像;根据所述宠物图像提取宠物的多个身体特征;将所述宠物的多个身体特征与宠物身体特征数据库中的数据进行匹配,得到匹配的宠物类型,可使用户快速获知宠物的类型,增进对宠物的了解,帮助用户选择自己喜爱的宠物。

Description

宠物类型识别的方法、 装置及终端 技术领域
[0001] 本发明涉及到图像识别技术领域, 特别是涉及到一种宠物类型识别的方法、 装 置及终端。
背景技术
[0002] 宠物一般指人们为了消除孤寂或出于娱乐目的而豢养的动物。 宠物是为了精神 的目的而豢养的动植物。 一般为了消除孤寂, 或娱乐而豢养, 一般是哺乳纲或 鸟纲的动物, 因为这些动物脑子比较发达, 容易和人交流。
[0003] 宠物种类繁多, 常见的宠物有猫、 狗、 鱼、 鸟等。 宠物猫的品种大致可分为加 菲猫, 折耳猫, 短毛猫, 波斯猫, 暹罗猫, 虎斑猫, 金吉拉, 巴厘猫, 伯曼猫 , 孟买猫, 缅甸猫, 埃及猫, 缅因猫, 欧西猫, 布偶猫, 卷毛猫, 新加坡猫, 挪威森林猫, 荧光猫, 索马里猫, 土耳其梵猫, 美国短尾猫等 42种 (采用美国 C AF标准) 。 而在 《AKC犬名录》 记录中, 全世界犬种 300多种, AKC认可的 149 种, 包括阿芬平嘉犬, 阿富汗猎犬, 万能梗, 秋田犬, 阿拉斯加雪橇犬等。
[0004] 显然, 依靠个人经验去识别如此种类繁多的宠物品种是一件不容易的事情。 而 对于一个喜欢小宠物的用户, 看到一只可爱的小宠物, 却对其一无所知, 是一 件非常遗憾的事情。
技术问题
[0005] 本发明的主要目的为提供一种宠物类型识别的方法、 装置及终端, 帮助用户识 别宠物的类型
问题的解决方案
技术解决方案
[0006] 本发明提出了一种宠物类型识别的方法, 包括: 获取宠物图像; 根据所述宠物 图像提取宠物的多个身体特征; 将所述宠物的多个身体特征与宠物身体特征数 据库中的数据进行匹配, 得到匹配的宠物类型。
[0007] 优选地, 所述通过相机拍摄所述宠物图像, 包括: [0008] 通过相机拍摄宠物, 得到初始宠物图像。
[0009] 优选地, 所述通过相机拍摄宠物, 得到初始宠物图像之后, 还包括:
[0010] 记录拍摄所述初始宠物图像吋, 相机的位移信息; 判断所述位移信息是否在设 定的允许识别的位移阈值范围内, 在判断出所述位移信息在所述位移阈值范围 内吋, 将所述初始宠物图像作为宠物图像。
[0011] 优选地, 所述根据所述宠物图像提取宠物的多个身体特征, 包括: 从宠物图像 中提取宠物的整体轮廓; 从所述宠物的整体轮廓中定位脸部、 躯干、 尾巴和四 肢的位置区域; 在所述脸部、 躯干、 尾巴和四肢的位置区域中分别提取宠物的 脸部特征、 躯干特征、 尾巴特征和四肢特征, 所述脸部特征包括眼睛特征、 嘴 巴特征、 鼻子特征、 耳朵特征以及脸部轮廓; 将所述宠物的脸部特征、 躯干特 征、 尾巴特征和四肢特征组合在一起, 形成宠物身体特征集合, 每个特征包括 颜色和形状两个参数。
[0012] 优选地, 所述宠物身体特征数据库中的数据包括: 多个宠物类型的匹配图像集 , 每个宠物类型的匹配图像集包括一张或多张预设的宠物匹配图像, 其中包含 一张携带宠物类型标记的所述宠物匹配图像, 记为代表宠物图像; 从每张所述 宠物匹配图像提取得到的参比宠物身体特征集合, 所述参比宠物身体特征集合 中包含所述宠物匹配图像中所述宠物的多个特征; 与每个宠物类型的匹配图像 集对应的区别特征集合, 所述区别特征集合表示某一类型宠物的一个或多个区 别特征, 所述区别特征为用于该类型宠物与其他类型宠物进行区分的特征。
[0013] 优选地, 所述将所述宠物身体特征集合与宠物身体特征数据库中的数据进行匹 配, 得到匹配的宠物类型包括: 判断所述宠物身体特征集合是否包含区别特征 集合; 若包含区别特征集合, 则判断包含的区别特征集合是否多于一个; 若是 , 则将包含的区别特征集合记为筛分区别特征集合, 采用匹配机制对所述多个 筛分区别特征集合进行筛分, 得到匹配的宠物类型; 若包含一个区别特征集合 , 则获取与所述区别特征集合对应的宠物类型的匹配图像集的宠物类型标记, 得到匹配的宠物类型。
[0014] 优选地, 所述采用匹配机制对所述多个筛分区别特征集合进行筛分, 得到匹配 的宠物类型, 包括: 获取与筛分区别特征集合对应的宠物类型的筛分匹配图像 集; 调取所述筛分匹配图像集中的所有宠物图像, 获取每张宠物图像对应的参 比宠物身体特征集合; 将所述宠物身体特征集合中的特征与调取的参比宠物身 体特征集合中的特征进行逐一比对, 计算所述宠物身体特征集合与每个调取的 参比宠物身体特征集合的匹配度; 通过根据所述筛分匹配图像集中所有宠物身 体特征集合与每个调取的参比宠物身体特征集合的匹配度, 计算所述宠物身体 特征集合中的特征与调取的参比宠物身体特征集合的匹配度, 计算所述筛分匹 配图像集与所述宠物身体特征集合匹配度的平均值, 获得作为宠物图像与宠物 类型的整体匹配度; 将整体匹配度最高的筛分匹配图像集参比宠物身体特征集 合对应的宠物类型作为匹配宠物类型。
[0015] 本发明还提出了一种宠物类型识别的装置, 包括: 获取模块, 用于获取宠物图 像; 特征提取模块, 用于根据所述宠物图像提取宠物的身体特征; 匹配模块, 用于将所述宠物的多个身体特征与宠物身体特征数据库中的数据进行匹配, 得 到匹配的宠物类型。
[]
[0016] 本发明还提出了一种终端, 包括处理器和存储器; 所述存储器用于存储执行上 述任意一项所述宠物类型识别方法的程序; 所述处理器被配置为用于执行所述 存储器中存储的程序。
发明的有益效果
有益效果
[0017] 本发明提出的宠物类型识别方法、 装置及终端, 其方法中, 智能终端获取宠物 图像; 根据所述宠物图像提取宠物的多个身体特征; 将所述宠物的多个身体特 征与宠物身体特征数据库中的数据进行匹配, 得到匹配的宠物类型, 可使用户 快速获知宠物的类型, 增进对宠物的了解, 帮助用户选择自己喜爱的宠物。 对附图的简要说明
附图说明
[0018] 图 1为本发明宠物类型识别的方法的第一实施例的流程示意图;
[0019] 图 2为本发明宠物类型识别的方法宠物身体特征数据库中的数据类型示意图;
[0020] 图 3为本发明宠物类型识别的装置的第一实施例的结构示意图; [0021] 图 4为本发明宠物类型识别的装置的第二实施例的结构示意图;
[0022] 图 5为本发明宠物类型识别的装置的第三实施例的结构示意图;
[0023] 图 6为本发明宠物类型识别的装置的第五实施例的结构示意图;
[0024] 图 7为本发明宠物类型识别的装置的第六实施例的结构示意图;
[0025] 图 8为本发明宠物类型识别方法的构思解析图。
[0026] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。
实施该发明的最佳实施例
本发明的最佳实施方式
[0027] 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发 明。
[0028] 本发明提出一种宠物类型识别的方法, 该宠物类型识别的方法可以应用于控制 终端, 控制终端可以为但不限于平板电脑、 手机或其他智能设备。 本实施例及 以下实施例以手机为例进行说明。 图像识别过程一般是图像通过手机上传至服 务器, 由服务器解析而获得结果再将结果传回手机。 参照图 1, 图 1为本发明宠 物类型识别的方法的第一实施例的流程示意图。 本发明提出的宠物类型识别的 方法, 包括如下步骤:
[0029] S10、 获取宠物图像;
[0030] S20、 根据所述宠物图像提取宠物的多个身体特征;
[0031] S30、 将所述宠物的多个身体特征与宠物身体特征数据库中的数据进行匹配, 得到匹配的宠物类型。
[0032] 如步骤 S10所述, 首先是获取宠物图像, 该图像可通过手机拍摄而获取, 也可 以通过导入手机内部的图像或加载网络上的图像。
[0033] 如步骤 S20所述, 可通过现有的识别技术对宠物的身体特征进行提取。
[0034] 在步骤 S30中, 宠物身体特征数据库中储存了大量类型的宠物数据。 某一类型 的宠物也储存了大量的个体宠物特征信息。 数据库统计了某一类型宠物的某一 特征的排布情况, 若该特征离散性较大, 则说明该特征并不是该类型宠物的区 分特征, 则此特征在匹配计算吋, 权重占比可忽略或占比小; 若该特征离散性 小, 则说明该特征是该类型宠物的区分特征, 则此特征在匹配计算吋, 权重占 比大。 具体的占比权重根据宠物类型的不同而不同。 如宠物 X同吋包括区别特征 A和区别特征 B, 区别特征 A属于 A类型宠物, 区别特征 B属于 B类型宠物。 此吋 , 装置可分析宠物 X的其他特征是否落入 A类型或 B类型宠物的范围, 若只有 A类 型符合而 B类型不符合, 则优先传送 A类型的宠物图片和名称。 匹配过程中, 宠 物身体特征集合与宠物身体特征数据库进行匹配的方式为, 宠物身体特征集合 中的各个特征变量与宠物身体特征数据库中各个类型的宠物特征数据逐一匹配 , 获得匹配结果。
[0035] 当匹配出对应的宠物类型后, 可以通过输出匹配结果给用户, 告知用户匹配的 宠物类型。 输出的结果可以是包括宠物类型名称, 该类型宠物的某一图片或图 片集。 选用的图片来自于宠物数据库, 该宠物数据库包含了宠物身体特征数据 库中对应特征的宠物图像。 选用的图片一般与要辨识的图像中宠物的动作相同 。 输出结果可以是单一结果, 但不限于单一结果。 可依据匹配度的高低依次输 出判断结果, 匹配度高的优先显示, 用户对该结果不满意可切换至较低匹配度 的结果。
[0036] 进一步的, 基于本发明宠物类型识别的方法的第一实施例, 本发明还提出了宠 物类型识别的方法的第二实施例, 与宠物类型识别的方法的第一实施例不同的 是, 步骤 S10包括:
[0037] S101、 通过相机拍摄宠物, 得到初始宠物图像;
[0038] S102、 记录拍摄所述初始宠物图像吋, 相机的位移信息;
[0039] S103、 判断所述位移信息是否在设定的允许识别的位移阈值范围内, 在判断出 所述位移信息在所述位移阈值范围内吋, 将所述初始宠物图像作为宠物图像。
[0040] 步骤 S101中, 在此场景下, 用户是通过手机对准宠物拍照, 获取宠物的图像。
辨识装置可读取相机的型号以及成像条件。 成像条件包括像素值, ISO感光系数
, 白平衡参数等。 辨识装置可根据具体型号的相机型号及成像条件对图像进行 优化, 使该宠物图像数据与实际值更为接近。
[0041] 在步骤 S102、 S103中, 用户看到一只自己心仪的宠物, 心情会比较兴奋, 手持 手机拍照吋, 手部可能因为心情兴奋而不能平稳地拍摄宠物图像。 本实施例的 方法可检测用户拍照吋是否手抖过度而导致拍摄的宠物图像无法用于识别宠物 类型。
具体的方法是通过三轴陀螺仪或其他相关位置获取配件, 获取手机中拍摄所述 宠物图像吋的设备位置信息, 记录成像前的位置信息为 (x。, y。, z o) , 成像 后的位置信息为 (X ly iZ l) , 则可计算其位移信息。 具体为:
Figure imgf000008_0001
[0044] 判断所述位移信息是否超过设定允许识别的位移阈值。 若没有超过, 则该图像 可以用于宠物类型识别, 若超过, 则提醒用户重新拍摄。
[0045] 进一步的, 基于本发明宠物类型识别的方法的第一实施例, 本发明还提出了宠 物类型识别的方法的第三实施例, 与宠物类型识别的方法的第一实施例不同的 是, 步骤 S20包括:
[0046] S21、 从宠物图像中提取宠物的整体轮廓;
[0047] S22、 从所述宠物的整体轮廓中定位脸部、 躯干、 尾巴和四肢的位置区域; [0048] S23、 在所述脸部、 躯干、 尾巴和四肢的位置区域中分别提取宠物的脸部特征
、 躯干特征、 尾巴特征和四肢特征, 所述脸部特征包括眼睛特征、 嘴巴特征、 鼻子特征、 耳朵特征以及脸部轮廓。
[0049] 如步骤 S21所述, 对宠物轮廓的辨识, 是通过建立神经网络模型实现的。 通过 大量的图片训练, 使装置可辨别宠物图像中宠物和背景的差异, 进而找出宠物 的轮廓。
[0050] 一般地, 就辨识宠物类型而言, 识别脸部特征最为重要。 利用神经网络模型的 培训机制, 辨识装置可识别出宠物的脸部轮廓。 根据宠物脸部的颜色与环境颜 色的差异, 判断周围环境的环境参数。 结合所述脸部的轮廓内颜色和所述环境 参数辨识宠物的整体轮廓。 比如辨识一只猫所处的环境, 是在床单上还是在地 板上, 是在草地上还是在道路上。 扣除了背景之后, 便可获得宠物的整体轮廓 [0051] 在一些较为复杂的背景中, 扣除背景后获得的宠物整体轮廓并不是真实的宠物 轮廓, 还包括了部分背景, 此吋可通过宠物身体轮廓定位模型, 保留合理的轮 廓部分。
[0052] 如步骤 S22所述, 在辨别出宠物轮廓的基础上, 将宠物的轮廓划分成四个区域 : 头部, 躯干, 四肢和尾巴。 由于成像的角度问题, 四肢和尾巴的特征可能在 图像中不显著, 在统计特征吋, 可根据实际情况忽略该两处特征。
[0053] 在步骤 S23中, 辨识头部的特征最为重要, 头部的特征具体包括了耳朵形状, 耳朵颜色, 耳朵相对于脸部的大小, 耳朵位置等; 眼睛形状, 眼睛相对于脸部 的大小, 眼睛颜色, 眼睛在脸部位置等; 鼻子形状, 鼻子相对于脸部的大小, 鼻子颜色, 鼻子在脸部的位置等; 嘴巴形状, 嘴巴相对于脸部的大小, 嘴巴颜 色, 嘴巴在脸部的位置; 脸部相对于躯干的大小, 脸部颜色, 脸部形状等。
[0054] 躯干的特征主要包括躯干相对于头部的大小, 躯干的颜色和颜色分布等。
[0055] 四肢的特征主要包括腿长, 腿部颜色, 腿的粗细等。
[0056] 尾巴的特征主要包括尾巴长度, 尾巴颜色和尾巴粗细等。 但实际拍摄中, 尾巴 常常不能完整地出现于图像之中, 所以装置可智能筛选可甄别的特征。
[0057] 以上宠物的身体特征, 每个特征都用一个变量表示。 提取宠物图像上所有的宠 物特征, 将所有特征组成一个宠物身体特征集合。 但在提取的过程中并不是每 个特征都能被提取。 此吋, 宠物身体特征集合中, 表示不能被提取的特征的变 量的值记为 0。
[0058] 进一步的, 基于本发明宠物类型识别的方法的第三实施例, 本发明还提出了宠 物类型识别的方法的第四实施例, 与宠物类型识别的方法的第三实施例不同的 是, 步骤 S30中宠物身体特征数据库中的数据包括:
[0059] 多个宠物类型的匹配图像集 301, 每个宠物类型的匹配图像集包括一张或多张 预设的宠物匹配图像, 其中包含一张携带宠物类型标记的所述宠物匹配图像, 记为代表宠物图像;
[0060] 从每张所述宠物匹配图像提取得到的参比宠物身体特征集合 302, 所述参比宠 物身体特征集合中包含所述宠物匹配图像中所述宠物的多个特征;
[0061] 与每个宠物类型的匹配图像集对应的区别特征集合 303, 所述区别特征集合表 示某一类型宠物的一个或多个区别特征, 所述区别特征为用于该类型宠物与其 他类型宠物进行区分的特征。
[0062] 如图 2所示, 宠物身体特征数据库中包括多种宠物类型的特征数据, 每种宠物 类型的特征数据又分为三种数据类型, 分别为匹配图像集, 参比宠物身体特征 集合和区别特征集合。
[0063] 匹配图像集 301是指某一宠物类型的图像集, 比如针对波斯猫, 宠物身体特征 数据库储存有波斯猫的图像集。 为了使数据不过度与具体的宠物个体拟合, 某 个宠物个体的宠物图像不超过三张。
[0064] 参比宠物身体特征集合 302是指与每张数据库储存的图片对应的宠物身体特征 集合。 宠物身体特征的提取可参照实施例二和实施例三的方法。
[0065] 区别特征集合 303是指某一类型用于该类型宠物与其他类型宠物进行区分的特 征集合。 可通过收集该类型的宠物图像, 提取每张宠物图像的身体特征, 统计 各个身体特征的排布情况。 区别特征集合 303中, 可区分重要区别特征, 一般区 别特征。 在实际情况下可定义超过 80%的宠物图像具有的宠物特征为重要区别特 征, 超过 60%但小于 80%的宠物图像具有的宠物特征设置为一般区别特征。 在单 一的区别特征中, 可设置多个数据范围, 并定义对不同的数据范围设置不同的 权重, 例如, 将某一特征划分为三个数据范围 [0,1],(1,2],(2,3], [0,1]的权重设置 为 0.8, (1,2]的权重设置为 0.6, (2,3]的权重设置为 0.4。 权重为 0.8表示该类型 >80 <¾的宠物图像具有该特征。
[0066] 进一步的, 基于本发明宠物类型识别的方法的第四实施例, 本发明还提出了宠 物类型识别的方法的第五实施例, 与宠物类型识别的方法的第四实施例不同的 是, 步骤 S30还包括:
[0067] S31、 判断所述宠物身体特征集合是否包含区别特征集合;
[0068] S32、 若包含区别特征集合, 则判断包含的区别特征集合是否多于一个;
[0069] S33、 若是, 则将包含的区别特征集合记为筛分区别特征集合, 采用匹配机制 对所述多个筛分区别特征集合进行筛分, 得到匹配的宠物类型;
[0070] S34、 若包含一个区别特征集合, 则获取与所述区别特征集合对应的宠物类型 的匹配图像集的宠物类型标记, 得到匹配的宠物类型。 [0071] 如步骤 S31所述, 假设宠物身体特征集合为 {a i,a 2,a 3...an}, 记为集合八。 某一 类型的区别特征集合为 {{Χ ,}, {Χ2}, {Χ3}}, 记为集合 X, 此处假定区别特征 集合 X只包括三个区别特征。 另一类型的区别特征集合 Q为 {{Qi}, {Q2}}, 此处 假定区别特征集合 Q只包括两个区别特征。 设定 & 1,&2,&3分别与{ 1}, {X2}, {X 3}对应, &4,&5分别与{01}, {Q2}对应。 若 a!eiX!}, a2e{X2}, a3e{X3}, 则可 判断集合 A包含区别特征集合 X。 若 a^iQ i}, a5e{Q2}, 则判断集合 A包含区别 特征集合0。 若区别特征集合 X中的子集 Xn不包含集合 A的对应特征元素 an, 则 可判定集合 A不包含区别特征集合 X。
[0072] 如步骤 S32、 S33、 S34所述, 本步骤是关于判断出现不同结果的处理方法。 若 集合 A不包含任何区别特征集合, 则匹配不成功, 输出无法识别的结果。 若集合 A包含一个区别特征集合, 则输出与该区别特征集合对应的宠物类型的宠物代表 图像。 点击宠物代表图像, 可加载相应的匹配宠物图像集, 方便用户査看该类 型宠物的不同个体的特点, 增加该类型的宠物的了解。 若集合 A包含多个区别特 征集合, 则采用筛分机制, 对得到的结果进一步筛分, 获得各个区别特征集合 的匹配度, 按匹配度的高低输出匹配结果。
[0073] 进一步的, 基于本发明宠物类型识别的方法的第五实施例, 本发明还提出了宠 物类型识别的方法的第六实施例, 与宠物类型识别的方法的第五实施例不同的 是, 步骤 S33中, 所述采用匹配机制对所述多个筛分区别特征集合进行筛分, 得 到匹配的宠物类型, 包括:
[0074] S331、 获取与筛分区别特征集合的多个对应的宠物类型的筛分匹配图像集;
[0075] S332、 调取与每个所述宠物类型的所述筛分匹配图像集中的所有宠物图像, 获 取每张宠物图像对应的参比宠物身体特征集合;
[0076] S333、 将所述宠物身体特征集合中的特征与调取的参比宠物身体特征集合中的 特征进行逐一比对, 计算所述宠物身体特征集合与每个调取的参比宠物身体特 征集合的匹配度;
[0077] S334、 通过根据所述筛分匹配图像集中所有宠物身体特征集合与每个调取的参 比宠物身体特征集合的匹配度, 计算所述宠物身体特征集合中的特征与调取的 参比宠物身体特征集合的匹配度, 计算所述筛分匹配图像集与所述宠物身体特 征集合匹配度的平均值, 获得作为宠物图像与宠物类型的整体匹配度;
[0078] S335、 将整体匹配度最高的参比宠物身体特征集合对应的宠物类型作为匹配宠 物类型。
[0079] 步骤 S331、 S332中, 假设筛分区别特征集合对应的宠物类型为 B、 C、 D, 则调 取宠物类型 B、 C、 D对应的宠物图像集, 并调取 B、 C、 D宠物图像集中所有的 宠物图像对应的参比宠物身体特征集合。 以宠物类型 B为例, 宠物类型 B中有 n张 宠物图像, 则其对应的参比宠物身体特征集合也有 n个, 记为 B 1 ; B 2, ...B n。 参比宠物身体特征集合 B
Figure imgf000012_0001
i , b 2, ...b n}, t为正整数, 取值范围为 [1, n]。
[0080] 在步骤 S333中, 集合 A分别与 B i, B 2, ...B n比较, 计算出相应的匹配度 η , , η 2 , ...η η。 则宠物类型 Β整体匹配度 ^可由求解 η ι, η 2, ...η ^ 平均值得到。 同 理可求出宠物类型 C的整体匹配度 η c和宠物类型 D的整体匹配度 η D
[0081] 在步骤 S334、 S335中, 根据整体匹配度的大小, 按顺序输出相应的宠物代表图 像。 整体匹配度最高的宠物类型优先显示, 点击宠物代表图像, 可加载相应的 匹配宠物图像集。 假定整体匹配度η B最高, 用户可在宠物图像集 B中査看多张 B 类型宠物图像, 直观地与现实中的宠物对比, 得出自己的判断结果。
[0082] 参照图 3, 图 3为本发明宠物类型识别的装置的第一实施例的结构示意图。 本发 明提出一种宠物类型识别的装置, 包括:
[0083] 获取模块 10, 用于获取宠物图像;
[0084] 特征提取模块 20, 用于根据所述宠物图像提取宠物的身体特征;
[0085] 匹配模块 30, 用于将所述宠物的多个身体特征与宠物身体特征数据库中的数据 进行匹配, 得到匹配的宠物类型。
[0086] 获取模块 10中, 首先是获取宠物图像, 该图像可通过手机拍摄而获取, 也可以 通过导入手机内部的图像或加载网络上的图像。
[0087] 特征提取模块 20, 是通过建立神经网络模型实现的。 通过大量的图片训练, 使 装置可辨别宠物图像中宠物和背景的差异, 进而找出宠物的轮廓。
[0088] 在辨别出宠物轮廓的基础上, 将宠物的轮廓划分成四个区域: 头部, 躯干, 四 肢和尾巴。 由于成像的角度问题, 四肢和尾巴的特征可能在图像中不显著, 在 统计特征吋, 可根据实际情况忽略该两处特征。 [0089] 辨识头部的特征最为重要, 头部的特征具体包括了耳朵形状, 耳朵颜色, 耳朵 相对于脸部的大小, 耳朵位置; 眼睛形状, 眼睛相对于脸部的大小, 眼睛颜色 , 眼睛在脸部位置; 鼻子形状, 鼻子相对于脸部的大小, 鼻子颜色, 鼻子在脸 部的位置; 嘴巴形状, 嘴巴相对于脸部的大小, 嘴巴颜色, 嘴巴在脸部的位置 ; 脸部相对于躯干的大小, 脸部颜色, 脸部形状。
[0090] 躯干的特征主要包括躯干相对于头部的大小, 躯干的颜色和颜色分布。
[0091] 四肢的特征主要包括腿长, 腿部颜色, 腿的粗细。
[0092] 尾巴的特征主要包括尾巴长度, 尾巴颜色和尾巴粗细。 但实际拍摄中, 尾巴常 常不能完整地出现于图像之中, 所以装置可智能筛选可甄别的特征。
[0093] 在匹配模块 30中, 宠物身体特征数据库中储存了大量类型的宠物数据。 某一类 型的宠物也储存了大量的个体宠物特征信息。 数据库统计了某一类型宠物的某 一特征的排布情况, 若该特征离散性较大, 则说明该特征并不是该类型宠物的 区分特征, 则此特征在匹配计算吋, 权重占比可忽略或占比小; 若该特征离散 性小, 则说明该特征是该类型宠物的区分特征, 则此特征在匹配计算吋, 权重 占比大。 具体的占比权重根据宠物类型的不同而不同。 如宠物 X同吋包括区别特 征 A和区别特征 B, 区别特征 A属于 A类型宠物, 区别特征 B属于 B类型宠物。 此 吋, 装置可分析宠物 X的其他特征是否落入 A类型或 B类型宠物的范围, 若只有 A 类型符合而 B类型不符合, 则优先传送 A类型的宠物图片和名称。
[0094] 输出结果是包括宠物类型名称, 该类型宠物的某一图片或图片集。 选用的图片 来自于宠物数据库, 该宠物数据库包含了宠物身体特征数据库中对应特征的宠 物图像。 选用的图片一般与辨识的图像宠物动作相同。 输出结果可以是单一结 果, 但不限于单一结果。 可依据匹配度的高低依次输出判断结果, 匹配度高的 优先显示, 用户对该结果不满意可切换至较低匹配度的结果。
[0095] 如图 4所示, 图 4为本发明宠物类型识别的装置的第二实施例的结构示意图。 进 一步的, 基于本发明宠物类型识别的装置的第一实施例, 本发明还提出了宠物 类型识别的装置的第二实施例。 与宠物类型识别的装置的第一实施例不同的是 , 获取模块 10还包括:
[0096] 图像获取单元 101, 用于通过相机拍摄宠物, 得到初始宠物图像。 [0097] 位移记录单元 102, 用于记录拍摄所述宠物图像吋的设备位移信息;
[0098] 图像清晰度判断单元 103, 用于判断所述位移信息是否在设定的允许识别的位 移阈值范围内, 在判断出所述位移信息在所述位移阈值范围内吋, 将所述初始 宠物图像作为宠物图像。
[0099] 图像获取单元 101中, 用户是通过手机对准宠物拍照, 获取宠物的图像。 辨识 装置可读取相机的型号以及成像条件。 成像条件包括像素值, ISO感光系数, 白 平衡参数等。 辨识装置可根据具体型号的相机型号及成像条件对图像进行优化 , 使该宠物图像数据与实际值更为接近。
[0100] 位移记录单元 102中, 用户看到一只自己心仪的宠物, 心情会比较兴奋, 手持 手机拍照吋, 手部可能因为心情兴奋而不能平稳地拍摄宠物图像。 本实施例的 装置可检测用户拍照吋是否手抖过度而导致拍摄的宠物图像无法用于识别宠物 类型。
[0101] 图像清晰度判断单元 103中, 具体的装置是通过三轴陀螺仪或其他相关位置获 取配件, 获取手机中拍摄所述宠物图像吋的设备位置信息, 记录成像前的位置 信息为 (x。, y。, z o) , 成像后的位置信息为 (X l, y , , Z l) , 则可计算其位 移信息。 具体为:
Figure imgf000014_0001
[0103] 判断所述位移信息是否超过设定允许识别的位移阈值范围内, 其中, 位移值范 围为预先设置。 若没有超过, 则该图像可以用于宠物类型识别, 若超过, 则提 醒用户重新拍摄。
[0104] 如图 5所示, 图 5为本发明宠物类型识别的装置的第三实施例的结构示意图。 进 一步的, 基于本发明宠物类型识别的装置的第一实施例, 本发明还提出了宠物 类型识别的装置的第三实施例, 与宠物类型识别的装置的第一实施例不同的是 , 所述特征提取模块 20包括: [0105] 整体轮廓提取单元 21, 用于从宠物图像中提取宠物的整体轮廓;
[0106] 身体位置定位单元 22, 用于从所述宠物的整体轮廓中定位脸部、 躯干、 尾巴和 四肢的位置区域;
[0107] 特征提取单元 23, 用于在所述脸部、 躯干、 尾巴和四肢的位置区域中分别提取 宠物的脸部特征、 躯干特征、 尾巴特征和四肢特征, 所述脸部特征包括眼睛特 征、 嘴巴特征、 鼻子特征、 耳朵特征以及脸部轮廓。
[0108] 整体轮廓提取单元 21中, 对宠物轮廓的辨识, 是通过建立神经网络模型实现的
。 通过大量的图片训练, 使装置可辨别宠物图像中宠物和背景的差异, 进而找 出宠物的轮廓。
[0109] 一般地, 就辨识宠物类型而言, 识别脸部特征最为重要。 利用神经网络模型的 培训机制, 辨识装置可识别出宠物的脸部轮廓。 根据宠物脸部的颜色与环境颜 色的差异, 判断周围环境的环境参数。 结合所述脸部的轮廓内颜色和所述环境 参数辨识宠物的整体轮廓。 比如辨识一只猫所处的环境, 是在床单上还是在地 板上, 是在草地上还是在道路上。 扣除了背景之后, 便可获得宠物的整体轮廓
[0110] 在一些较为复杂的背景中, 扣除背景后获得的宠物整体轮廓并不是真实的宠物 轮廓, 还包括了部分背景, 此吋可通过宠物身体轮廓定位模型, 保留合理的轮 廓部分。
[0111] 身体位置定位单元 22中, 在辨别出宠物轮廓的基础上, 将宠物的轮廓划分成四 个区域: 头部, 躯干, 四肢和尾巴。 由于成像的角度问题, 四肢和尾巴的特征 可能在图像中不显著, 在统计特征吋, 可根据实际情况忽略该两处特征。
[0112] 特征提取单元 23中, 辨识头部的特征最为重要, 头部的特征具体包括了耳朵形 状, 耳朵颜色, 耳朵相对于脸部的大小, 耳朵位置等; 眼睛形状, 眼睛相对于 脸部的大小, 眼睛颜色, 眼睛在脸部位置等; 鼻子形状, 鼻子相对于脸部的大 小, 鼻子颜色, 鼻子在脸部的位置等; 嘴巴形状, 嘴巴相对于脸部的大小, 嘴 巴颜色, 嘴巴在脸部的位置; 脸部相对于躯干的大小, 脸部颜色, 脸部形状等
[0113] 躯干的特征主要包括躯干相对于头部的大小, 躯干的颜色和颜色分布等。 [0114] 四肢的特征主要包括腿长, 腿部颜色, 腿的粗细等。
[0115] 尾巴的特征主要包括尾巴长度, 尾巴颜色和尾巴粗细等。 但实际拍摄中, 尾巴 常常不能完整地出现于图像之中, 所以装置可智能筛选可甄别的特征。
[0116] 以上宠物的身体特征, 每个特征都用一个变量表示。 提取宠物图像上所有的宠 物特征, 将所有特征组成一个宠物身体特征集合。 但在提取的过程中并不是每 个特征都能被提取。 此吋, 宠物身体特征集合中, 表示不能被提取的特征的变 量的值记为 0。
[0117] 将所述宠物的脸部特征、 躯干特征、 尾巴特征和四肢特征组合在一起, 形成宠 物身体特征集合, 每个特征包括颜色和形状两个参数。
[0118] 进一步的, 基于本发明宠物类型识别的装置的第三实施例, 本发明还提出了宠 物类型识别的装置的第四实施例, 与宠物类型识别的装置的第三实施例不同的 是, 所述宠物身体特征数据库包括:
[0119] 多个宠物类型的匹配图像集 301, 每个宠物类型的匹配图像集包括一张或多张 预设的宠物匹配图像, 其中包含一张携带宠物类型标记的所述宠物匹配图像, 记为代表宠物图像;
[0120] 从每张所述宠物匹配图像提取得到的参比宠物身体特征集合 302, 所述参比宠 物身体特征集合中包含所述宠物匹配图像中所述宠物的多个特征;
[0121] 与每个宠物类型的匹配图像集对应的区别特征集合 303, 所述区别特征集合表 示某一类型宠物的一个或多个区别特征, 所述区别特征为用于该类型宠物与其 他类型宠物进行区分的特征。
[0122] 匹配图像集 301是指某一宠物类型的图像集, 比如针对波斯猫, 宠物身体特征 数据库储存有波斯猫的图像集。 为了使数据不过度与具体的宠物个体拟合, 某 个宠物个体的宠物图像不超过三张。
[0123] 参比宠物身体特征集合 302是指与每张数据库储存的图片对应的宠物身体特征 集合。 宠物身体特征的提取可参照实施例 2和实施例 3的方法。
[0124] 区别特征集合 303是指某一类型用于该类型宠物与其他类型宠物进行区分的特 征集合。 可通过收集该类型的宠物图像, 提取每张宠物图像的身体特征, 统计 各个身体特征的排布情况。 区别特征集合 303中, 可区分重要区别特征, 一般区 别特征。 在实际情况下可定义超过 80%的宠物图像具有的宠物特征为重要区别特 征, 超过 60%但小于 80%的宠物图像具有的宠物特征设置为一般区别特征。 在单 一的区别特征中, 可设置多个数据范围, 并定义对不同的数据范围设置不同的 权重, 例如, 将某一特征划分为三个数据范围 [0,1],(1,2],(2,3], [0,1]的权重设置 为 0.8, (1,2]的权重设置为 0.6, (2,3]的权重设置为 0.4。 权重为 0.8表示该类型 >80 <¾的宠物图像具有该特征。
[0125] 如图 6所示, 图 6为本发明宠物类型识别的装置的第五实施例的结构示意图。 进 一步的, 基于本发明宠物类型识别的装置的第四实施例, 本发明还提出了宠物 类型识别的装置的第五实施例, 与宠物类型识别的装置的第四实施例不同的是 , 所述匹配模块 30包括:
[0126] 匹配单元 31, 用于判断所述宠物身体特征集合是否包含区别特征集合;
[0127] 结果分析单元 32, 用于分析若包含区别特征集合, 则判断包含的区别特征集合 是否多于一个;
[0128] 多结果处理单元 33, 用于结果分析单元出现多个结果吋, 则将包含的区别特征 集合记为筛分区别特征集合, 采用匹配机制对所述多个筛分区别特征集合进行 筛分, 得到匹配的宠物类型;
[0129] 单一结果处理单元 34, 用于结果分析单元只有一个结果吋, 则获取与所述区别 特征集合对应的宠物类型的匹配图像集的宠物类型标记, 得到匹配的宠物类型
[0130] 匹配单元 31中, 假设宠物身体特征集合为 {a i,a2,a 3...an}, 记为集合八。 某一类 型的区别特征集合为 {{X ,}, {X2}, {X3}}, 记为集合 X, 此处假定区别特征集 合 X只包括三个区别特征。 另一类型的区别特征集合 Q为 {{(^}, {Q2}}, 此处假 定区别特征集合 Q只包括两个区别特征。 设定 &1,&2,&3分别与{ 1}, {X2}, {X3} 对应, a4,a5分别与 {Q i}, {Q2}对应。 若 a!eiX !}, a2e{X2}, a3e{X3}, 则可判 断集合 A包含区别特征集合 X。 若 a^iQ i}, a5e{Q2}, 则判断集合 A包含区别特 征集合 Q。 若区别特征集合 X中的子集 Xn不包含集合 A的对应特征元素 an, 则可 判定集合 A不包含区别特征集合 X。
[0131] 结果分析单元 32中, 若集合 A不包含任何区别特征集合, 则输出无法识别的结 果。 单一结果处理单元 34中, 集合 A只包含一个区别特征集合, 则输出与该区别 特征集合对应的宠物类型的宠物代表图像。 点击宠物代表图像, 可加载相应的 匹配宠物图像集, 方便用户査看该类型宠物的不同个体的特点, 增加该类型的 宠物的了解。 多结果处理单元 33中, 集合 A包含多个区别特征集合, 则采用筛分 机制, 对得到的结果进一步筛分, 获得各个区别特征集合的匹配度, 按匹配度 的高低输出匹配结果。
[0132] 如图 7所示, 图 7为本发明宠物类型识别的装置的第六实施例的结构示意图。 进 一步的, 基于本发明宠物类型识别的装置的第五实施例, 本发明还提出了宠物 类型识别的装置的第六实施例, 与宠物类型识别的装置的第五实施例不同的是 , 结果分析单元 33中的匹配机制包括:
[0133] 调取子单元 331, 用于获取与筛分区别特征集合对应的宠物类型的筛分匹配图 像集; 调取所述筛分匹配图像集中的所有宠物图像, 获取每张宠物图像对应的 参比宠物身体特征集合;
[0134] 匹配子单元 332, 用于将所述宠物身体特征集合中的特征与调取的参比宠物身 体特征集合中的特征进行逐一比对, 计算所述宠物身体特征集合与每个调取的 参比宠物身体特征集合的匹配度; 通过根据所述筛分匹配图像集中所有宠物身 体特征集合与每个调取的参比宠物身体特征集合的匹配度, 计算所述宠物身体 特征集合中的特征与调取的参比宠物身体特征集合的匹配度, 计算所述筛分匹 配图像集与所述宠物身体特征集合匹配度的平均值, 获得作为宠物图像与宠物 类型的整体匹配度;
[0135] 适配子单元 333, 用于将整体匹配度最高的筛分匹配图像集参比宠物身体特征 集合对应的宠物类型作为匹配宠物类型。
[0136] 调取子单元 331中, 假设筛分区别特征集合对应的宠物类型为 B、 C、 D, 则调 取宠物类型 B、 C、 D对应的宠物图像集, 并调取 B、 C、 D宠物图像集中所有的 宠物图像对应的参比宠物身体特征集合。 以宠物类型 B为例, 宠物类型 B中有 n张 宠物图像, 则其对应的参比宠物身体特征集合也有 n个, 记为 B 1 ; B 2, . . .B n。 参比宠物身体特征集合 B
Figure imgf000018_0001
i , b 2, . . .b n }, t为正整数, 取值范围为 [ 1, n]。
[0137] 匹配子单元 332中, 集合 A分别与 B ,, B 2, . . .B n比较, 计算出相应的匹配度 η , , η 2, ...η η。 则宠物类型 Β整体匹配度 η Β可由求解 η ι, η 2, ...η η的平均值得到
。 同理可求出宠物类型 C的整体匹配度 η c和宠物类型 D的整体匹配度 η D
[0138] 适配子单元 333中, 根据整体匹配度的大小, 按顺序输出相应的宠物代表图像 。 整体匹配度最高的宠物类型优先显示, 点击宠物代表图像, 可加载相应的匹 配宠物图像集。 假定整体匹配度η B最高, 用户可在宠物图像集 B中査看多张 B类 型宠物图像, 直观地与现实中的宠物对比, 得出自己的判断结果。
[0139] 本发明还提出了一种终端, 包括处理器和存储器; 所述存储器用于存储执行上 述任意一项所述宠物类型识别方法的程序; 所述处理器被配置为用于执行所述 存储器中存储的程序。
[0140] 上述终端可以为手机、 平板电脑、 智能手表、 智能手环或智能眼镜等智能设备 中的一种。 上述终端必须携带有摄像头以获取宠物图像。
[0141] 所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描述的终 端的具体工作过程, 可以参考前述方法实施例中的对应过程, 在此不再赘述。
[0142] 如图 8所示, 图 8为本发明宠物类型识别方法的构思解析图。 本发明提出的宠物 类型识别方法, 首先是通过训练机制判断宠物的位置 (即宠物的轮廓) , 再将 宠物的轮廓划分为头部, 躯干, 四肢, 尾部四个部位, 提取各个部位的特征, 与宠物身体特征数据库中的数据进行匹配, 输出匹配结果。

Claims

权利要求书
一种宠物类型识别的方法, 其特征在于, 包括:
获取宠物图像;
根据所述宠物图像提取宠物的多个身体特征;
将所述宠物的多个身体特征与宠物身体特征数据库中的数据进行匹配 , 得到匹配的宠物类型。
根据权利要求 1所述的宠物类型识别的方法, 其特征在于, 所述获取 宠物图像, 包括:
通过相机拍摄宠物, 得到初始宠物图像。
根据权利要求 2所述的宠物类型识别的方法, 其特征在于, 所述通过 相机拍摄宠物, 得到初始宠物图像之后, 还包括:
记录拍摄所述初始宠物图像吋, 相机的位移信息;
判断所述位移信息是否在设定的允许识别的位移阈值范围内, 在判断 出所述位移信息在所述位移阈值范围内吋, 将所述初始宠物图像作为 宠物图像。
根据权利要求 1所述的宠物类型识别的方法, 其特征在于, 所述根据 所述宠物图像提取宠物的多个身体特征, 包括:
从宠物图像中提取宠物的整体轮廓;
从所述宠物的整体轮廓中定位脸部、 躯干、 尾巴和四肢的位置区域; 在所述脸部、 躯干、 尾巴和四肢的位置区域中分别提取宠物的脸部特 征、 躯干特征、 尾巴特征和四肢特征, 所述脸部特征包括眼睛特征、 嘴巴特征、 鼻子特征、 耳朵特征以及脸部轮廓;
将所述宠物的脸部特征、 躯干特征、 尾巴特征和四肢特征组合在一起 , 形成宠物身体特征集合, 每个特征包括颜色和形状两个参数。 根据权利要求 4所述的宠物类型识别的方法, 其特征在于, 所述宠物 身体特征数据库中的数据包括:
多个宠物类型的匹配图像集, 每个宠物类型的匹配图像集包括一张或 多张预设的宠物匹配图像, 其中包含一张携带宠物类型标记的所述宠 物匹配图像, 记为代表宠物图像;
从每张所述宠物匹配图像提取得到的参比宠物身体特征集合, 所述参 比宠物身体特征集合中包含所述宠物匹配图像中所述宠物的多个特征
与每个宠物类型的匹配图像集对应的区别特征集合, 所述区别特征集 合表示某一类型宠物的一个或多个区别特征, 所述区别特征为用于该 类型宠物与其他类型宠物进行区分的特征。
[权利要求 6] 根据权利要求 5所述的宠物类型识别的方法, 其特征在于, 所述将所 述宠物身体特征集合与宠物身体特征数据库中的数据进行匹配, 得到 匹配的宠物类型包括:
判断所述宠物身体特征集合是否包含区别特征集合;
若包含区别特征集合, 则判断包含的区别特征集合是否多于一个; 若是, 则将包含的区别特征集合记为筛分区别特征集合, 采用匹配机 制对所述多个筛分区别特征集合进行筛分, 得到匹配的宠物类型; 若包含一个区别特征集合, 则获取与所述区别特征集合对应的宠物类 型的匹配图像集的宠物类型标记, 得到匹配的宠物类型。
[权利要求 7] 根据权利要求 6所述的宠物类型识别的方法, 其特征在于, 所述采用 匹配机制对所述多个筛分区别特征集合进行筛分, 得到匹配的宠物类 型, 包括:
获取与筛分区别特征集合对应的宠物类型的筛分匹配图像集; 调取所述筛分匹配图像集中的所有宠物图像, 获取每张宠物图像对应 的参比宠物身体特征集合;
将所述宠物身体特征集合中的特征与调取的参比宠物身体特征集合中 的特征进行逐一比对, 计算所述宠物身体特征集合与每个调取的参比 宠物身体特征集合的匹配度;
根据所述筛分匹配图像集中所有的参比宠物身体特征集合的匹配度, 计算所述筛分匹配图像集与所述宠物身体特征集合匹配度的平均值, 作为宠物图像与宠物类型的整体匹配度; 将整体匹配度最高的筛分匹配图像集对应的宠物类型作为匹配宠物类 型。
[权利要求 8] —种宠物类型识别的装置, 其特征在于, 包括:
获取模块, 用于获取宠物图像;
特征提取模块, 用于根据所述宠物图像提取宠物的身体特征; 匹配模块, 用于将所述宠物的多个身体特征与宠物身体特征数据库中 的数据进行匹配, 得到匹配的宠物类型。
[权利要求 9] 根据权利要求 8所述的宠物类型识别的装置, 其特征在于, 所述获取 模块包括:
图像获取单元, 用于通过相机拍摄宠物, 得到初始宠物图像。
[权利要求 10] 根据权利要求 9所述的宠物类型识别的装置, 其特征在于, 所述获取 模块还包括:
位移记录单元, 用于记录拍摄所述宠物图像吋的设备位移信息; 图像清晰度判断单元, 用于判断所述位移信息是否在设定的允许识别 的位移阈值范围内, 在判断出所述位移信息在所述位移阈值范围内吋 , 将所述初始宠物图像作为宠物图像。
[权利要求 11] 根据权利要求 8所述的宠物类型识别的装置, 其特征在于, 所述特征 提取模块包括:
整体轮廓提取单元, 用于从宠物图像中提取宠物的整体轮廓; 身体位置定位单元, 用于从所述宠物的整体轮廓中定位脸部、 躯干、 尾巴和四肢的位置区域;
特征提取单元, 用于在所述脸部、 躯干、 尾巴和四肢的位置区域中分 别提取宠物的脸部特征、 躯干特征、 尾巴特征和四肢特征, 所述脸部 特征包括眼睛特征、 嘴巴特征、 鼻子特征、 耳朵特征以及脸部轮廓; 将所述宠物的脸部特征、 躯干特征、 尾巴特征和四肢特征组合在一起 , 形成宠物身体特征集合, 每个特征包括颜色和形状两个参数。
[权利要求 12] 根据权利要求 11所述的宠物类型识别的装置, 其特征在于, 所述宠物 身体特征数据库包括: 多个宠物类型的匹配图像集, 每个宠物类型的匹配图像集包括一张或 多张预设的宠物匹配图像, 其中包含一张携带宠物类型标记的所述宠 物匹配图像, 记为代表宠物图像;
从每张所述宠物匹配图像提取得到的参比宠物身体特征集合, 所述参 比宠物身体特征集合中包含所述宠物匹配图像中所述宠物的多个特征 与每个宠物类型的匹配图像集对应的区别特征集合, 所述区别特征集 合表示某一类型宠物的一个或多个区别特征, 所述区别特征为用于该 类型宠物与其他类型宠物进行区分的特征。
[权利要求 13] 根据权利要求 12所述的宠物类型识别的装置, 其特征在于, 所述匹配 模块包括:
匹配单元, 用于判断所述宠物身体特征集合是否包含区别特征集合; 结果分析单元, 用于分析若包含区别特征集合, 则判断包含的区别特 征集合是否多于一个;
多结果处理单元, 用于结果分析单元出现多个结果吋, 则将包含的区 别特征集合记为筛分区别特征集合, 采用匹配机制对所述多个筛分区 别特征集合进行筛分, 得到匹配的宠物类型;
单一结果处理单元, 用于结果分析单元只有一个结果吋, 则获取与所 述区别特征集合对应的宠物类型的匹配图像集的宠物类型标记, 得到 匹配的宠物类型。
[权利要求 14] 根据权利要求 13所述的宠物类型识别的装置, 其特征在于, 所述结果 分析单元包括:
调取子单元, 用于获取与筛分区别特征集合对应的宠物类型的筛分匹 配图像集; 调取所述筛分匹配图像集中的所有宠物图像, 获取每张宠 物图像对应的参比宠物身体特征集合;
匹配子单元, 用于将所述宠物身体特征集合中的特征与调取的参比宠 物身体特征集合中的特征进行逐一比对, 计算所述宠物身体特征集合 与每个调取的参比宠物身体特征集合的匹配度; 通过根据所述筛分匹 配图像集中所有宠物身体特征集合与每个调取的参比宠物身体特征集 合的匹配度, 计算所述宠物身体特征集合中的特征与调取的参比宠物 身体特征集合的匹配度, 计算所述筛分匹配图像集与所述宠物身体特 征集合匹配度的平均值, 获得作为宠物图像与宠物类型的整体匹配度 适配子单元, 用于将整体匹配度最高的筛分匹配图像集参比宠物身体 特征集合对应的宠物类型作为匹配宠物类型。
[权利要求 15] —种终端, 其特征在于, 包括处理器和存储器;
所述存储器用于存储执行权利要求 1-6中任意一项所述宠物类型识别 方法的程序;
所述处理器被配置为用于执行所述存储器中存储的程序。
PCT/CN2017/074840 2016-11-22 2017-02-24 宠物类型识别的方法、装置及终端 Ceased WO2018094892A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611032333.8A CN106577350B (zh) 2016-11-22 2016-11-22 宠物类型识别的方法及装置
CN201611032333.8 2016-11-22

Publications (1)

Publication Number Publication Date
WO2018094892A1 true WO2018094892A1 (zh) 2018-05-31

Family

ID=58591589

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074840 Ceased WO2018094892A1 (zh) 2016-11-22 2017-02-24 宠物类型识别的方法、装置及终端

Country Status (2)

Country Link
CN (1) CN106577350B (zh)
WO (1) WO2018094892A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132026A (zh) * 2020-09-22 2020-12-25 平安国际智慧城市科技股份有限公司 动物识别方法及装置
US11538087B2 (en) 2019-02-01 2022-12-27 Societe Des Produits Nestle Sa Pet food recommendation devices and methods
RU2800013C2 (ru) * 2019-02-01 2023-07-14 Сосьете Де Продюи Нестле Са Устройства и способы представления рекомендации по кормам для домашних животных

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875564A (zh) * 2018-05-02 2018-11-23 浙江工业大学 一种宠物面部识别方法
CN109274891B (zh) * 2018-11-07 2021-06-22 北京旷视科技有限公司 一种图像处理方法、装置及其存储介质
CN109409319A (zh) * 2018-11-07 2019-03-01 北京旷视科技有限公司 一种宠物图像美化方法、装置及其存储介质
CN112101070B (zh) * 2019-06-18 2022-09-02 财团法人农业科技研究院 以鼻纹提升识别率的动物身份识别系统及其方法
CN110704646A (zh) * 2019-10-16 2020-01-17 支付宝(杭州)信息技术有限公司 一种豢养物档案建立方法及装置
CN111666441A (zh) * 2020-04-24 2020-09-15 北京旷视科技有限公司 确定人员身份类型的方法、装置和电子系统
CN113091248B (zh) * 2021-03-29 2022-09-06 青岛海尔空调器有限总公司 空调的控制方法、装置、设备和存储介质
CN113657318B (zh) * 2021-08-23 2024-05-07 平安科技(深圳)有限公司 基于人工智能的宠物分类方法、装置、设备及存储介质
CN115546838B (zh) * 2022-10-20 2023-11-24 星宠王国(北京)科技有限公司 一种基于狗脸图像识别技术的婚介系统及方法
CN115527073A (zh) * 2022-11-08 2022-12-27 吉林农业大学 一种植物图像分类方法和系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320319A (zh) * 2008-05-14 2008-12-10 山东大学 一种适时识别水生动物的装置及其工作方法
WO2012154841A2 (en) * 2011-05-09 2012-11-15 Mcvey Catherine Grace Image analysis for determining characteristics of animal and humans
CN104573745A (zh) * 2015-01-21 2015-04-29 中国计量学院 基于磁共振成像的实蝇分类方法
CN105954281A (zh) * 2016-04-21 2016-09-21 南京农业大学 一种稻谷霉变真菌菌落无损识别的方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5134277A (en) * 1983-11-07 1992-07-28 Australian Meat And Live-Stock Corporation Remote data transfer system with ambient light insensitive circuitry
JP3436293B2 (ja) * 1996-07-25 2003-08-11 沖電気工業株式会社 動物の個体識別装置及び個体識別システム
JP4872797B2 (ja) * 2007-05-18 2012-02-08 カシオ計算機株式会社 撮像装置、撮像方法および撮像プログラム
CN201409150Y (zh) * 2008-12-19 2010-02-17 康佳集团股份有限公司 一种可识别宠物的手机
US20120086792A1 (en) * 2010-10-11 2012-04-12 Microsoft Corporation Image identification and sharing on mobile devices
JP5660306B2 (ja) * 2010-12-17 2015-01-28 カシオ計算機株式会社 撮像装置、プログラム、及び撮像方法
CN102523380B (zh) * 2011-11-10 2015-05-27 深圳市同洲电子股份有限公司 对移动终端的相机进行防抖的方法及该移动终端
US20140029808A1 (en) * 2012-07-23 2014-01-30 Clicrweight, LLC Body Condition Score Determination for an Animal
CN103124311B (zh) * 2013-01-24 2014-08-20 广东欧珀移动通信有限公司 一种手机拍照方法
CN105744164B (zh) * 2016-02-24 2019-01-29 惠州Tcl移动通信有限公司 一种移动终端拍照方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320319A (zh) * 2008-05-14 2008-12-10 山东大学 一种适时识别水生动物的装置及其工作方法
WO2012154841A2 (en) * 2011-05-09 2012-11-15 Mcvey Catherine Grace Image analysis for determining characteristics of animal and humans
CN104573745A (zh) * 2015-01-21 2015-04-29 中国计量学院 基于磁共振成像的实蝇分类方法
CN105954281A (zh) * 2016-04-21 2016-09-21 南京农业大学 一种稻谷霉变真菌菌落无损识别的方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11538087B2 (en) 2019-02-01 2022-12-27 Societe Des Produits Nestle Sa Pet food recommendation devices and methods
RU2800013C2 (ru) * 2019-02-01 2023-07-14 Сосьете Де Продюи Нестле Са Устройства и способы представления рекомендации по кормам для домашних животных
CN112132026A (zh) * 2020-09-22 2020-12-25 平安国际智慧城市科技股份有限公司 动物识别方法及装置
CN112132026B (zh) * 2020-09-22 2024-07-05 深圳赛安特技术服务有限公司 动物识别方法及装置

Also Published As

Publication number Publication date
CN106577350B (zh) 2020-10-09
CN106577350A (zh) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106577350B (zh) 宠物类型识别的方法及装置
JP6942464B2 (ja) 画像処理装置、画像処理方法、及びプログラム
US8891883B2 (en) Summarizing a photo album in a social network system
JP6664163B2 (ja) 画像識別方法、画像識別装置及びプログラム
JP2010532022A (ja) 画像コレクションの合成人物モデル
US20120014567A1 (en) Wireless Location and Facial/Speaker Recognition System
JP2011086261A (ja) 情報処理装置及び情報処理方法
CN102253995B (zh) 一种利用位置信息实现图像搜索的方法和系统
CN111753697B (zh) 智能宠物管理系统及其管理方法
JP2011517791A (ja) イベントマーカーとしての装飾
JP5671224B2 (ja) 画像処理装置、画像処理方法
CN113785304B (zh) 人脸识别方法和装置
JP5351084B2 (ja) 画像認識装置及び画像認識方法
US20140233811A1 (en) Summarizing a photo album
JP4427714B2 (ja) 画像認識装置、画像認識処理方法および画像認識プログラム
JP2022100358A (ja) 捜索支援システムにおける探索方法および装置
US10075631B2 (en) Imaging apparatus, imaging method and recording medium having program for performing self-timer shooting
KR20180090637A (ko) 고양이와의 의사소통을 위한 시스템
JPH10248827A (ja) 個人認識装置
JP2022086414A (ja) 情報処理方法、情報処理システム、撮影装置、サーバ装置及びコンピュータプログラム
WO2014186392A2 (en) Summarizing a photo album
CN117119287A (zh) 一种无人机拍摄角度的确定方法、装置及介质
CN116229500A (zh) 鸟类识别方法、装置、设备及存储介质
JP2008233959A (ja) 画像処理装置、画像処理方法、プログラムおよび記録媒体
JP2022086997A (ja) 情報処理方法及び情報処理システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17874786

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17874786

Country of ref document: EP

Kind code of ref document: A1