Disclosure of Invention
An object of an embodiment of the present invention is to provide an animal identification method and an animal identification apparatus, so as to overcome, at least to a certain extent, one or more problems that a large amount of labor cost is required for conventional raised animal identification and that raised animal identification is prone to error due to limitations and disadvantages of the related art.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the invention.
According to a first aspect of embodiments of the present invention, there is provided an animal identification method comprising:
the effectiveness of the obtained image is verified, and an invalid image is filtered out to obtain a first image;
identifying an animal face in the first image, and identifying the identified animal face to obtain a second image identifying the animal face;
carrying out animal facial feature recognition on the second image, labeling the recognized animal facial features to form a third image, and generating a corresponding feature vector based on the recognized animal facial features;
and realizing animal identification based on the third image and the feature vector corresponding to the third image.
In an embodiment of the present invention, the acquired image at least includes data format information, resolution information and an animal face of the image; the verifying the validity of the acquired image and filtering the invalid image to obtain the first image includes:
inputting the image into a preset validity check model to obtain a validity check result of the image;
filtering images which do not conform to a preset data format and a preset resolution ratio based on the validity check result to obtain filtered images;
and filtering the incomplete image of the animal face in the filtered image to obtain a first image.
In an embodiment of the present invention, the method further includes:
and when the image is judged not to conform to the preset data format and the preset resolution and/or the animal face in the image is judged to be incomplete, generating and sending control information for re-acquiring the image.
In an embodiment of the present invention, the recognizing the animal face in the first image, and identifying the recognized animal face to obtain the second image identifying the animal face, includes:
inputting the first image into a preset animal face recognition model to obtain an animal face recognition result corresponding to the first image;
determining a range of an animal face in the first image based on the animal face recognition result;
and drawing the animal face range in a frame to generate a second image in which the animal face range is drawn in the frame.
In an embodiment of the present invention, the performing facial feature recognition on the animal in the second image, labeling the recognized facial features of the animal, and forming a third image includes:
identifying portions of the animal face in the second image;
and marking the identified parts according to a preset sequence to obtain a third image with marks of the parts of the animal face.
In one embodiment of the present invention, each of the parts includes at least: eye, nose, ear; marking each identified part according to a preset sequence to obtain a third image with marks of each part of the animal face, wherein the third image comprises:
noting position points in the second image for the left and right eye of the identified eye region;
identifying a left nasal tip and a right nasal tip of the identified nose region in the second image as location points;
marking position points on the root of the left ear and the root of the right ear of the ear part identified in the second image;
and obtaining a third image with position points of the left eye and the right eye of the eye part, position points of the left nose tip and the right nose tip of the nose part, and position points of the left ear root and the right ear root of the ear part.
In an embodiment of the present invention, the generating a corresponding feature vector based on the identified facial features of the animal includes:
and drawing the relative position of the frame of the range of the animal face according to the position points of the left eye and the right eye of the eye part of the animal face in the third image, the position points of the left nose tip and the right nose tip of the nose part, the position points of the left ear root and the right ear root of the ear part and the frame to generate the feature vector of the animal face.
According to a second aspect of embodiments of the present invention, there is provided an animal identification apparatus comprising: the system comprises a checking module, an identification module, a characteristic identification module and an output module; wherein the content of the first and second substances,
the verification module is used for verifying the effectiveness of the acquired image, filtering the invalid image and acquiring a first image;
the identification module is used for identifying the animal face in the first image, identifying the identified animal face and obtaining a second image identifying the animal face;
the feature recognition module is used for carrying out animal facial feature recognition on the second image, labeling the recognized animal facial features to form a third image, and generating a corresponding feature vector based on the recognized animal facial features;
and the output module is used for realizing animal identification based on the third image and the feature vector corresponding to the third image.
According to a third aspect of embodiments of the present invention there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, carries out the animal identification method of the first aspect of the embodiments described above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the animal identification method as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical scheme provided by some embodiments of the invention, validity verification is carried out on the acquired image, and an invalid image is filtered out to obtain a first image; identifying an animal face in the first image, and identifying the identified animal face to obtain a second image identifying the animal face; carrying out animal facial feature recognition on the second image, labeling the recognized animal facial features to form a third image, and generating a corresponding feature vector based on the recognized animal facial features; and realizing animal identification based on the third image and the feature vector corresponding to the third image. According to the technical scheme of the embodiment of the invention, the characteristic information base of the animal is established through an artificial intelligence algorithm, so that the animal is documented or identified, the cost is greatly saved, the feeding efficiency is improved, the whole feeding process is simplified and optimized, a basic support is provided for subsequent unmanned and intelligent feeding, and the feasibility of an artificial intelligence project in the field of animal husbandry is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 schematically shows a flow chart of an animal identification method according to an embodiment of the invention.
Referring to fig. 1, an animal identification method according to an embodiment of the present invention includes the steps of:
step S110, carrying out validity check on the acquired image, filtering the invalid image and obtaining a first image;
step S120, identifying the animal face in the first image, identifying the identified animal face, and obtaining a second image identifying the animal face;
step S130, carrying out animal facial feature recognition on the second image, labeling the recognized animal facial features to form a third image, and generating a corresponding feature vector based on the recognized animal facial features;
and step S140, recognizing the animal based on the third image and the feature vector corresponding to the third image.
According to the technical scheme of the embodiment shown in the figure 1, the characteristic information base of the animal can be established through an artificial intelligence algorithm, so that the animal can be filed or identified, the cost is greatly saved, the feeding efficiency is improved, the whole feeding process is simplified and optimized, a basic support is provided for subsequent unmanned and intelligent feeding, and the feasibility of the artificial intelligence project in the field of the animal husbandry industry is improved.
Implementation details of the various steps shown in FIG. 1 are set forth below:
in step S110, validity check is performed on the acquired image, and the invalid image is filtered out to obtain a first image.
In an embodiment of the present invention, before the step S110, the method further includes: the images are acquired through pre-installed shooting and recording equipment, specifically, the pre-installed shooting and recording equipment can be shooting and recording equipment installed in a breeding environment and used for monitoring the overall operation condition of the bred animals, for example: the camera, the mobile phone and the like can also provide corresponding images for the artificial intelligent animal recognition algorithm through the shooting and recording equipment.
In an embodiment of the present invention, based on the foregoing scheme, the erection of the recording device may be adjusted according to actual requirements, and the recording device with corresponding parameters is selected for erection according to reasons such as the image quality, the video quality, and the light ray required for identification.
In an embodiment of the present invention, based on the foregoing solution, step S110 is to perform validity detection on the acquired image and identify whether the face of the animal is complete, so that the animal needs to be photographed from multiple angles in the process of erecting the camera device before step S110, so as to photograph the face of the animal from multiple angles as much as possible in the subsequent identification process, so as to establish multiple face data for the animal in the database, and provide a data base for accurately identifying the animal at a later stage.
In an embodiment of the invention, based on the foregoing scheme, the shooting devices with different parameters can be selected at different positions according to different animal feeding environments and the condition that the animals need to be shot at night or under different lighting conditions, so as to reduce the overall hardware cost.
In an embodiment of the present invention, based on the foregoing solution, the camera device laid according to the animal raising environment is an infrastructure for providing images, and can store videos shot by the camera device according to different storage modes, as shown in fig. 2a, the shot videos can be stored in a cloud, or as shown in fig. 2b, the shot videos can be stored in a local external device storage, at a later stage, a key frame is extracted from the videos through transmission of a real-time video stream, and an animal within a shooting range is detected and identified according to the extracted key frame.
In one embodiment of the invention, the output of animal face detection and identification is data obtained by processing images based on an algorithm, the acquired original images are input into a system through an interface or a batch import mode, the processing of an identification device is waited, and if the camera selects cloud storage, a video stream interface needs to be accessed from a third party to obtain real-time images or video data; if the camera selects local external storage equipment for storage, a local server is needed or image or video data are transmitted back through a network in real time.
In an embodiment of the present invention, the acquired image at least includes data format information, resolution information and an animal face of the image, and the step S110 specifically includes: inputting the image into a preset validity check model to obtain a validity check result of the image; filtering the image which does not conform to the preset data format and the preset resolution ratio based on the validity check result to obtain a filtered image; and filtering the incomplete image of the animal face in the filtered image to obtain a first image.
In one embodiment of the invention, based on the scheme, when the image is judged not to conform to the preset data format and the preset resolution and/or the animal face in the image is judged to be incomplete, the control information for re-collecting the image is generated and sent.
In one embodiment of the invention, after an image is extracted from a video shot by a camera device, the authenticity and the validity of the image are verified, a simple validity verification algorithm can be formed according to the identification standard or condition of an animal face, firstly, the input image is primarily filtered and screened, the image with the image format and the resolution not meeting the requirements is filtered, finally, whether the animal face is cut off or not is judged from the filtered image, the image with the animal face not complete is filtered, and a first image which meets the requirements of the image format and the resolution and has the animal face complete is obtained;
in an embodiment of the invention, based on the scheme, the image with the inconsistent image format and resolution and the image with the incomplete animal face are defined as abnormal images, and the animal face identification process is directly exited without occupying system resources for processing.
In one embodiment of the invention, in the subsequent process of filing based on the identified animal face, because a large amount of data can be collected in the animal filing process, the effective verification process of the image can realize filing only according to the effective image, thereby avoiding the problem that the animal cannot be accurately identified due to filing according to the ineffective image; if invalid data appear in the use process of identifying the animal after filing, the data acquisition part is returned, and the facial image of the animal is acquired again to identify the animal again.
In step S120, the animal face in the first image is identified, the identified animal face is identified, and a second image in which the animal face is identified is obtained.
In one embodiment of the invention, a first image is input into a preset animal face recognition model, and an animal face recognition result corresponding to the first image is obtained; determining a range of the animal face in the first image based on the animal face recognition result; and drawing the animal face range in a frame to generate a second image of which the frame draws the animal face range.
In an embodiment of the present invention, after the validity determination of the image in step S110 is completed, the artificial intelligence algorithm detection is performed on the first image, specifically, the animal face detection may be performed on the input data, that is, whether an animal face exists in the image is detected, and if the animal face exists, the animal face is framed.
FIG. 3 schematically illustrates a frame depicting an image of a face region of an animal, according to one embodiment of the invention.
As shown in fig. 3, in step S120, the input first image needs to be processed, the animal faces in the image need to be analyzed, and the frame processing needs to be performed on the animal faces in the input first image, and the faces of each animal need to be framed out, so as to provide support for the later stage identification.
In step S130, animal facial feature recognition is performed on the second image, the recognized animal facial features are labeled to form a third image, and a corresponding feature vector is generated based on the recognized animal facial features.
In one embodiment of the invention, portions of the animal face are identified in the second image; and marking the identified parts according to a preset sequence to obtain a third image with marks of the parts of the animal face.
In one embodiment of the invention, based on the foregoing scheme, the left and right eyes of the identified eye part are marked with position points in the second image; identifying a left nasal tip and a right nasal tip of the identified nose region in the second image as location points; marking position points on the root of the left ear and the root of the right ear of the ear part identified in the second image; a third image in which the position points of the left and right eyes of the eye portion, the position points of the left and right nose tips of the nose portion, and the position points of the left and right ear roots of the ear portion are marked is obtained.
Fig. 4 schematically shows a diagram of the labeled animal facial features in the second image according to an embodiment of the invention.
As shown in fig. 4, in one embodiment of the present invention, a second image is input to an animal face recognition algorithm model, the detected animal face is recognized by a corresponding animal face feature recognition algorithm, the parts of the animal face are recognized, in step S130, the parts of the detected animal face are dotted, and in a certain order, for example: dotting the left nose tip, the right nose tip, the left eye, the right eye, the left ear root and the right ear root, dotting all the parts, outputting a third image with pig face identification mark points, simultaneously outputting a position coordinate vector of an animal face, and identifying the animal face according to the difference of vector values of mark positions of different animal face characteristic points.
And step S140, recognizing the animal based on the third image and the feature vector corresponding to the third image.
In one embodiment of the invention, the animal identification may be or be an identification of the animal, wherein profiling the animal comprises: after outputting a third picture marked with animal features and a feature vector corresponding to the third picture, judging whether the third picture and the feature vector corresponding to the third picture are filing data or not, if the third picture and the feature vector corresponding to the third picture are the filing data, inputting the third picture and the feature vector corresponding to the third picture into a database, establishing an animal file in the database according to the data, compiling a unique number for the animal according to a certain number sequence, and providing support for the subsequent use process; identifying the animal includes: if the third picture and the corresponding feature vector are judged not to be filing data, the third picture and the corresponding feature vector are compared with the archive data of the animal in the database, the animal data are searched and numbered for output, and meanwhile the corresponding management data are called out, so that the user can process the animal data and help work.
According to the animal identification method provided by the embodiment of the invention, the effectiveness of the acquired image is verified, and an invalid image is filtered out to obtain a first image; identifying an animal face in the first image, and identifying the identified animal face to obtain a second image identifying the animal face; carrying out animal facial feature recognition on the second image, labeling the recognized animal facial features to form a third image, and generating a corresponding feature vector based on the recognized animal facial features; and realizing animal identification based on the third image and the feature vector corresponding to the third image. According to the technical scheme of the embodiment of the invention, the characteristic information base of the animal is established through an artificial intelligence algorithm, so that the animal is documented or identified, the problems that the artificially fed animal cannot be identified and the different animals are difficult to perform targeted measures are solved, all states (such as the age of the day, the gestation period, the number of delivery times, the body state, whether to inoculate a vaccine and the like) of the fed animal can be accurately mastered in real time, and the animal is visual and intuitive; the system has the advantages that workers are reminded at different time points for different animals, the work of feeders is reasonably arranged, a large amount of waiting time is saved, and basic support is provided for a subsequent intelligent unmanned pig farm; the laid video recording equipment is set in an optimal layout, so that the utilization rate of each camera is improved as much as possible, the cameras with different parameters are set according to the image requirements of different positions, and the cost is reduced as much as possible on the premise of meeting the requirements; the technical scheme of the embodiment of the invention is that the detection is carried out firstly and then the identification is carried out, and the output characteristic vector value is unique, so that the animal can be ensured to be identified, and the file is established for the animal from the front face to the side face of the animal in multiple angles, thereby ensuring the uniqueness of the file data; through the data access scheme of optimal design, effective data can be intercepted at any time when needed, and different schemes are selected according to the actual conditions of different feedlots, so that personalized customization is realized.
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention.
The following describes an example of the application of the animal identification method proposed by the present invention to identification of individual pigs.
Fig. 5 schematically shows a flow chart of an animal identification method applied to individual identification of pigs according to an embodiment of the invention.
Referring to fig. 5, the animal identification method according to one embodiment of the present invention is applied to a process of individual identification of pigs, and includes the following steps:
step S501, erecting a shooting and recording device in a pig feed field;
in one embodiment of the invention, the video recording equipment is erected to monitor the whole operation condition of the pig farm so as to find problems in time, and meanwhile, corresponding picture data is provided for an artificial intelligent algorithm. Selecting the shooting equipment with corresponding parameters for erection according to the difference of the required pictures and video quality of different parts of the pigs; the main function of the process is to detect and identify the pig faces, so that different angles are needed in the process of erecting the shooting equipment, the head of a pig is shot at the angle as much as possible in the process of establishing a file, the face data of the pig as much as possible are established, and a data base can be provided for more accurate identification in the later period; according to different site conditions and filing requirements, different recording devices (such as a camera, a mobile phone, a mobile terminal and the like) can be selected. According to different practical conditions, shooting and recording are sometimes required to be carried out at night or under different illumination conditions, and when the cost is considered, shooting and recording equipment with different parameters is required to be selected at different positions, so that the hardware cost is reduced integrally.
Step S502, collecting images through the erected shooting and recording equipment;
in an embodiment of the invention, the video recording device erected in the early stage is an infrastructure for providing images, the images acquired by the erected video recording device can be stored in a cloud terminal or can be stored in a local external storage device in an acute manner, in practical application, videos recorded by the video recording device can be stored according to different storage modes, in the later stage, the videos are subjected to frame extraction processing by using an algorithm through transmission of real-time video streams, and only pigs in a video recording range are detected and identified according to extracted frames. Meanwhile, the camera is required to shoot effective pictures at any time, the picture quality can be guaranteed to be clear, the effective pictures are stored in a later-stage algorithm recognizable format, and the fact that each pig face has the angle as full as possible is guaranteed in the shooting process to improve the accuracy of later-stage pig face recognition.
Step S503, recording the collected image;
in one embodiment of the invention, the outcome of pig face detection and identification is based on data processed by an algorithm on the information. Inputting the acquired original data into the system through an interface or a batch import form, waiting for the processing of an artificial intelligence system, and accessing a video stream interface from a third party to acquire real-time data if the acquired image is stored in a cloud end by a camera; if the camera stores the acquired image in a local external storage device, a local server is needed or a video stream is transmitted back through a network in real time.
In practical application, different storage modes can be selected according to different situations, and since some cloud storages compress videos in the process of uploading the videos, videos with original image quality cannot be obtained from the cloud, and if the requirements on video pictures at the later stage are higher, the storage modes meeting the requirements should be selected, and specific contents can refer to fig. 2a and fig. 2b, which are not repeated here.
Step S504, judge whether the picture recorded is valid, if valid, output the first picture, carry out step S505; if not, returning to the step S502;
in an embodiment of the invention, after the image is acquired, the authenticity and the validity of the image are verified, an validity verification algorithm is formed according to a preset rule, the input image is primarily filtered and screened, data which meet the specifications (mainly including the format and the resolution requirement of the image data, whether the pig face is cut off and the like) can be circulated according to a normal flow, otherwise, the image data is defined as abnormal data, the flow is directly exited, and the system resource is not occupied for processing. Because a large amount of data can be collected in the filing process, effective data is only adopted for filing; if invalid data appear in the using process, the data acquisition part is returned, and the pig data is acquired again to be identified.
Step S505, determining and framing the pig face range in the first image;
in an embodiment of the present invention, after the validity determination is completed, artificial intelligence algorithm detection is performed on the first image, and the process mainly performs pig face detection on the input first image, that is, whether a pig face exists in the first image is detected, and if so, the pig face is framed out to provide support for later recognition, and specific contents may refer to fig. 3, which is not described herein again.
Step S506, a second image of the pig face is drawn by the output frame;
step S507, labeling each part of the pig face in the second image;
in an embodiment of the invention, the second image output from the pig face detection algorithm model is input into the pig face identification algorithm model, the detected pig face is identified by the pig face identification algorithm, specifically, the detected pig face is dotted, the left nose tip, the right nose tip, the left eye, the right eye, the left ear root and the right ear root of the pig face are dotted according to a certain sequence, the parts of the pig face are identified, after the parts are identified, a third picture with the pig face identification mark points is output, a position coordinate vector of the pig face is output, the pig face is identified according to different vector values of the pig face characteristic mark positions, and each pig outputs a unique vector due to the difference of long phases among individual pigs.
Step S508, outputting a third image labeled with the characteristics of each part of the pig face and a corresponding characteristic vector;
step S509, determining whether the third image and the corresponding feature vector are used for building a pig archive, if yes, executing step S510; if not, go to step S512;
step S510, inputting a third image and a corresponding feature vector into a database;
step S511, numbering the third image and the pigs corresponding to the corresponding feature vectors;
step S512, comparing the third image and the corresponding feature vector with the pig data in the database;
step S513, outputting the number of the corresponding pig;
in one embodiment of the invention, after the third picture and the corresponding feature vector are output by the pig face identification algorithm, whether the data is filing data is judged, if the data is the filing data, the third picture and the corresponding feature vector are input into a database, a pig file is established in the database according to the data, a unique number is compiled for the pig according to a certain number sequence, and support is provided for the follow-up use process; if the data is judged not to be the filing data, the collected data is compared with the pig file data in the database, the pig data is found, the pig data is numbered and output, and meanwhile, the corresponding management data is called out so as to be processed by a user and provide help for work.
Step S514, the current flow ends.
Embodiments of the apparatus of the present invention will now be described which may be used to carry out the animal identification method of the present invention described above.
Fig. 6 schematically shows a block diagram of an animal identification apparatus according to an embodiment of the invention.
Referring to fig. 6, an animal recognition apparatus 600 according to an embodiment of the present invention includes: a checking module 601, an identification module 602, a feature identification module 603 and an output module 604; wherein the content of the first and second substances,
the verification module 601 is configured to perform validity verification on the acquired image, filter an invalid image, and obtain a first image;
the identification module 602 is configured to identify an animal face in the first image, identify the identified animal face, and obtain a second image in which the animal face is identified;
the feature recognition module 603 is configured to perform animal facial feature recognition on the second image, label the recognized animal facial features to form a third image, and generate a corresponding feature vector based on the recognized animal facial features;
and an output module 604, configured to implement animal identification based on the third image and the feature vector corresponding to the third image.
Since the functional modules of the animal recognition device according to the exemplary embodiment of the present invention correspond to the steps of the exemplary embodiment of the animal recognition method described above, for details that are not disclosed in the embodiments of the device according to the present invention, reference is made to the embodiments of the animal recognition method described above according to the present invention.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with the electronic device implementing an embodiment of the present invention. The computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 1206 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is enabled to implement the screen control implementation and display method in the embodiment.
For example, the electronic device described above may implement as shown in fig. 1: step S110, acquiring an image of a manual ticket checking interface; step S120, analyzing the first area image to obtain a fuzzy value, and judging whether the first area image is a ticket image or not based on the fuzzy value; step S130, analyzing the second area image, determining the dominant color of the second area image, and determining the ticket state based on the dominant color; step S140, when the first area image is determined to be the ticket image and the ticket state is consistent, analyzing the third area image to obtain the certificate image; and S150, matching the certificate image with the face image collected by the camera to obtain a matching result, and checking the ticket based on the matching result.
As another example, the electronic device described above may implement the steps shown in fig. 4.
As another example, the electronic device described above may implement the steps shown in fig. 7.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.