Image recognition method and device
By selecting the effective part of the composition in the terminal device for continuous shooting and artificial intelligence processing, the problem that the terminal device cannot generate high-quality pictures is solved, and efficient face recognition and image generation are achieved.
Patent Information
- Application Number
- CN202211064546.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Existing terminal devices cannot automatically recognize objects and generate high-quality pictures during the picture shooting process, resulting in poor photo quality and low success rate of face recognition, and poor user experience.
Select the effective part in the composition from the live view screen by focusing, perform continuous shooting to obtain multiple images, and use artificial intelligence technology to retain the effective part and background part, delete other parts, and generate high-quality pictures after merging and processing.
Generate high-quality pictures in a short time, improving the accuracy and efficiency of face recognition.
Smart Images

Figure CN115424326B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a method and device for image recognition. Background Art
[0002] With the popularity and development of smart terminal devices, people often use them to take pictures. However, existing terminal devices cannot capture only specific scenes, objects, or faces during picture taking, resulting in poor picture quality, low facial recognition success rate, and a poor user experience.
[0003] It should be noted that the above introduction to the technical background is merely intended to provide a clear and complete description of the technical solutions of this application and facilitate understanding by those skilled in the art. Simply because these solutions are described in the background technology section of this application, it should not be assumed that the above technical solutions are well known to those skilled in the art. Summary of the Invention
[0004] Currently, when a terminal device is taking pictures, the terminal device cannot automatically identify objects and generate high-quality pictures.
[0005] To address at least one of the aforementioned problems, embodiments of the present application provide a method and apparatus for image recognition. By focusing to select a valid portion of a composition from a live view screen, continuously shooting the composition containing the valid portion to obtain at least two images, and processing the at least two images using artificial intelligence (AI) technology, retaining the valid portion and background portion of the at least two images and deleting other portions, and then merging the at least two processed images to generate an image, high-quality images can be obtained in a relatively short time and the accuracy and efficiency of face recognition can be improved.
[0006] According to one aspect of an embodiment of the present application, a method for image recognition is provided, the method comprising:
[0007] Focus to select the effective part of the composition from the live view screen,
[0008] Continuously shooting the composition including the effective portion to obtain at least two images,
[0009] Processing the at least two images by artificial intelligence (AI) technology, retaining the effective part and background part of the at least two images and deleting other parts except the effective part and background part,
[0010] The processed at least two images are merged to generate a picture.
[0011] In some embodiments, the at least two images are processed using artificial intelligence (AI) technology, including: identifying a three-dimensional stereogram of the effective part of each of the at least two images using the artificial intelligence (AI), and segmenting the three-dimensional stereogram to obtain at least two blocks.
[0012] In some embodiments, merging the at least two processed images and generating a picture includes: merging the at least two images according to the at least two blocks of each image, reconstructing the valid part, and generating the picture.
[0013] In some embodiments, reconstructing the valid portion includes: the at least two tiles contain position information of the valid portion, and reconstructing the valid portion according to the position information.
[0014] In some embodiments, the method further includes dynamically identifying the valid parts in the at least two images using the artificial intelligence (AI) technology.
[0015] In some embodiments, the dynamic identification of the valid portion in the at least two images by the artificial intelligence (AI) technology includes: identifying that the valid portion includes a moving object or a stationary object based on at least one of the following information: angle information; height information; or latitude and longitude information.
[0016] In some embodiments, the effective portion includes scenery or a portrait.
[0017] According to one aspect of an embodiment of the present application, a picture recognition device is provided, the device comprising:
[0018] A selection unit that performs focusing to select an effective portion of the composition from the live view screen,
[0019] a shooting unit for continuously shooting the composition including the effective portion to obtain at least two images,
[0020] a processing unit that processes the at least two images using artificial intelligence (AI) technology, retains the valid portion and background portion of the at least two images, and deletes portions other than the valid portion and background portion;
[0021] A merging unit is configured to merge the processed at least two images and generate a picture.
[0022] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned image recognition method when executing the computer program.
[0023] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions for executing the aforementioned image recognition method.
[0024] According to one aspect of an embodiment of the present application, a computer program product is provided, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the aforementioned image recognition method is implemented.
[0025] One of the beneficial effects of the embodiments of the present application is that high-quality images can be obtained in a shorter time and the accuracy and efficiency of face recognition can be improved.
[0026] With reference to the following description and accompanying drawings, specific embodiments of the present application are disclosed in detail, indicating the manner in which the principles of the present application can be employed. It should be understood that the embodiments of the present application are not limited in scope. Within the spirit and scope of the appended claims, the embodiments of the present application include many variations, modifications and equivalents.
[0027] Feature information described and illustrated for one embodiment may be used in one or more other embodiments in the same or similar manner, combined with feature information in other embodiments, or replace feature information in other embodiments.
[0028] It should be emphasized that the term "include / comprises" when used herein refers to the existence of characteristic information, whole items, steps or components, but does not exclude the existence or addition of one or more other characteristic information, whole items, steps or components. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Many aspects of the present application may be better understood with reference to the following drawings. The components in the drawings are not drawn to scale but are intended to illustrate the principles of the present application only. To facilitate illustration and description of some portions of the present application, corresponding portions in the drawings may be enlarged or reduced. Elements and feature information described in one drawing or one embodiment of the present application may be combined with elements and feature information shown in one or more other drawings or embodiments. In addition, in the drawings, similar reference numerals indicate corresponding components in several drawings and may be used to indicate corresponding components used in more than one embodiment.
[0030] In the attached figure:
[0031] Figure 1 is a structural diagram of an image recognition device according to an embodiment of the present application;
[0032] Figure 2A This is a schematic diagram of a valid portion of a selected composition in an embodiment of the present application;
[0033] Figure 2B This is a schematic diagram of an image generated by an embodiment of the present application;
[0034] Figure 3A This is another schematic diagram of the effective portion of the selected composition in the embodiment of the present application;
[0035] Figure 3B This is another schematic diagram of generating a picture in the embodiment of the present application
[0036] Figure 4 is a schematic diagram of the image recognition method according to an embodiment of the present application;
[0037] Figure 5 It is a schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The above and other features of the present application will become apparent through the following description with reference to the accompanying drawings. In the description and the accompanying drawings, specific embodiments of the present application are disclosed in detail, which illustrate some embodiments in which the principles of the present application can be adopted. It should be understood that the present application is not limited to the described embodiments. On the contrary, the present application includes all modifications, variations and equivalents that fall within the scope of the appended claims.
[0039] In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish different elements from the name, but do not indicate the spatial arrangement or temporal order of these elements, and these elements should not be limited by these terms. The term "and / or" includes any one and all combinations of one or more of the associated listed terms. The terms "comprising", "including", "having", etc. refer to the presence of the stated features, elements, components or components, but do not exclude the presence or addition of one or more other features, elements, components or components.
[0040] In the embodiments of this application, the singular forms "a," "the," etc. include plural forms and should be broadly understood to mean "a" or "a type" rather than being limited to "one." Furthermore, the term "said" should be understood to include both singular and plural forms, unless the context clearly indicates otherwise. Furthermore, the term "according to" should be understood to mean "at least in part based on...", and the term "based on" should be understood to mean "at least in part based on...", unless the context clearly indicates otherwise.
[0041] In response to the above problems, various implementation methods of the present application are described below in conjunction with the accompanying drawings. These implementation methods are only exemplary and do not limit the present application.
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the embodiments of the present application are further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but are not intended to limit the present application.
[0043] An embodiment of the present application provides an image recognition device.
[0044] Figure 1 FIG is a diagram showing a structure of an image recognition device according to an embodiment of the present application. Figure 1 As shown, the image recognition device 100 includes:
[0045] A selection unit 110 performs focusing to select a valid portion of the composition from the live view screen,
[0046] The shooting unit 120 continuously shoots the composition containing the effective part to obtain at least two images,
[0047] The processing unit 130 processes the at least two images using artificial intelligence (AI) technology, retains the effective portion and the background portion of the at least two images, and deletes other portions other than the effective portion and the background portion.
[0048] The merging unit 140 merges the processed at least two images and generates a picture.
[0049] As a result, high-quality images can be obtained in a shorter time and the accuracy and efficiency of face recognition can be improved.
[0050] In some embodiments, the effective portion includes scenery or a portrait.
[0051] Figure 2A This is a schematic diagram of a valid portion of a selected composition in an embodiment of the present application; Figure 3A This is another schematic diagram of the effective part selected in the composition of the embodiment of the present application.
[0052] For example, the selection unit 110 performs focusing to select a valid portion of the composition from the live view screen, including: Figure 2A As shown, in the example where the effective portion includes a scene, the frame portion represents at least one scene in the composition that can be selected; Figure 3A As shown, taking the effective portion including a portrait as an example, the frame portion represents at least one portrait in the composition that can be selected.
[0053] In some embodiments, the shooting unit 120 continuously shoots the composition containing the valid portion to obtain at least two images. Figure 2AFor example, after selecting the effective part of the composition, continuous shooting is performed to obtain at least two images ( Figure 2A (Not shown). For example, the terminal device rapidly captures a continuous shot to obtain multiple point maps of the scene or person in the image, and then performs AI processing on the image based on the selected scene or person in the image.
[0054] In some embodiments, the processing unit 130 uses artificial intelligence (AI) technology to identify a three-dimensional stereogram of the effective part of each image in the at least two images, and divides the three-dimensional stereogram into at least two blocks; in some embodiments, the processing unit 130 merges the at least two images according to the at least two blocks of each image, reconstructs the effective part, and generates a picture; in some embodiments, the at least two blocks contain position information of the effective part, and the processing unit 130 reconstructs the effective part according to the position information.
[0055] For example, artificial intelligence (AI) technology is used to identify a three-dimensional image of a scene or a portrait, and the three-dimensional image is divided into multiple blocks of different shapes. The blocks can be divided from left to right, or from top to bottom, and other dimensions, and the position information of the scene or portrait is recorded and saved; then the blocks of different images are recombined together to obtain multiple new images. By comparing the multiple images, the image with the best effect is selected and saved for output.
[0056] For example, the three-dimensional image is divided into N faces, and then the N faces of at least two images are recombined. For example, the first face of the first image contains the left half of a scene, and the Nth face of the second image contains the right half of the scene. The two faces are recombined to obtain a new valid portion, and then the valid portion is combined with the background portion to regenerate the image. Multiple images are obtained in this manner, and then the best image is selected for storage and output. For example, artificial intelligence (AI) technology can use existing technology, and this application does not limit this.
[0057] In this way, the effective part of the picture can be obtained more accurately according to the position information of the scene or the portrait, thereby improving the shooting quality of the picture.
[0058] In some embodiments, the processing unit 130 further dynamically identifies valid portions of the at least two images using artificial intelligence (AI) technology. In some embodiments, the valid portion is identified as containing a moving object or a stationary object based on at least one of the following information: angle information; altitude information; or latitude and longitude information.
[0059] For example, for moving scenes or portraits, the moving scenes or portraits and the still scenes or portraits can be identified based on at least two continuously shot images according to information such as angle information, height information, or latitude and longitude information. Then, the still scenes or portraits and the selected moving scenes or portraits (effective parts) and background parts can be saved, and other moving scenes or portraits (other parts outside the effective parts and background parts) can be deleted.
[0060] Figure 2B This is a schematic diagram of an image generated by an embodiment of the present application; Figure 3B This is another schematic diagram of generating a picture in the embodiment of the present application. For example, Figure 2A The original composition shown in FIG5 can save the framed static scene or portrait and the selected moving scene or portrait (effective part), and save the natural scene such as sky, white clouds, lawn, etc. in the live view screen (background part), and delete other moving scenes or portraits (other parts except the effective part and background part) and generate the following image by the above-mentioned image recognition method of the present application: Figure 2B The picture shown; for example, Figure 3A The original composition shown in FIG. 1 can save a specific portrait (framed portrait) and delete other portraits, and generate the following image by the above-mentioned image recognition method of this application: Figure 3B Picture shown.
[0061] The following describes the image recognition process of this application using the example of the effective portion including the scene:
[0062] First, focus is performed to select a valid portion of the composition from the live view screen, for example, a portion of the scene in the live view screen of the terminal device is selected, and this portion is the portion that is ultimately desired to be displayed (for example, Figure 2A This part is the scene that you want to recognize in the end, and the rest will not be recognized.
[0063] Furthermore, the selected scene is quickly photographed to obtain at least two images containing the scene, and the at least two images are processed by artificial intelligence (AI) technology to retain the effective part and background part of the at least two images and delete other parts; for example, all scenes in the at least two images are dynamically recognized, such as moving objects and stationary objects can be identified according to information such as angle, height, longitude and latitude, and the stationary objects are saved, and all moving objects except the selected objects are deleted; in addition, natural scenes such as the sky, white clouds, and lawn in the preview image are saved.
[0064] Finally, the AI-processed images are merged and the generated images are output to the gallery.
[0065] The following describes the image recognition process of this application using the example of a valid portion including a portrait:
[0066] First, focus is performed to select a valid portion of the composition from the live view screen, for example, a portrait (such as Figure 3A This part is the face part that we want to recognize, and the rest of the face and other parts will not be recognized;
[0067] Then, the selected portrait is rapidly photographed to obtain at least two images containing the portrait, and the at least two images are processed using artificial intelligence (AI) technology. For example, a three-dimensional image of the portrait is identified using the AI technology, and the three-dimensional image is divided into a plurality of blocks of different shapes. The blocks can be divided from left to right or from top to bottom, and other dimensions, and the position information of the entire portrait is recorded and saved; the blocks obtained from different images are recombined together to obtain multiple new images. By comparing the multiple images, the best image is selected and saved and output to a gallery;
[0068] Finally, the face recognition result is returned.
[0069] It should be noted that the hardware structure in the above example may also include devices not shown in the figure. For details, please refer to the existing technology. The embodiments of the present application are not limited to this. Alternatively, the hardware structure does not necessarily have to include all the components shown in the figure. Examples will not be given one by one here.
[0070] For simplicity, the figure only illustrates the connection relationship or signal direction between various components or modules, but it should be clear to those skilled in the art that the connection can adopt various related technologies such as electrical connection. The embodiments of the present application are not limited to this.
[0071] The above embodiments are merely exemplary of the present invention, but the present invention is not limited thereto. Appropriate modifications may be made based on the above embodiments. For example, the above embodiments may be used alone, or one or more of the above embodiments may be combined.
[0072] The present application focuses to select a valid part of the composition from the live view screen, continuously shoots the composition including the valid part to obtain at least two images, and processes the at least two images through artificial intelligence (AI) technology, retaining the valid part and background part of the at least two images and deleting other parts, and then merging the at least two processed images to generate a picture. In this way, high-quality pictures can be obtained in a shorter time and the accuracy and efficiency of face recognition can be improved.
[0073] The embodiment of the present application also provides an image recognition method.
[0074] The method corresponds to the image recognition device of the aforementioned embodiment. The embodiment of the method can refer to the description of the aforementioned embodiment, and the repeated content will not be described in detail again.
[0075] Figure 4 is a schematic diagram of the image recognition method according to an embodiment of the present application; Figure 4 As shown, the method includes:
[0076] Step 401: Focusing to select a valid portion of the composition from the live view screen,
[0077] Step 402: Continuously shoot the composition containing the valid portion to obtain at least two images.
[0078] Step 403: Processing the at least two images using artificial intelligence (AI) technology, retaining the valid portion and the background portion of the at least two images and deleting other portions other than the valid portion and the background portion.
[0079] Step 404: Merge the at least two processed images and generate a picture.
[0080] The execution of the above steps and their specific contents can refer to the description of the functions and structures of the various related components in the above embodiments, and will not be repeated here.
[0081] By focusing to select a valid part of a composition from a live view screen, continuously shooting the composition including the valid part to obtain at least two images, and processing the at least two images using artificial intelligence (AI) technology, retaining the valid part and background part of the at least two images and deleting other parts, and then merging the at least two processed images to generate a picture, high-quality pictures can be obtained in a shorter time and the accuracy and efficiency of face recognition can be improved.
[0082] An embodiment of the present application further provides a computer device, Figure 5 is a schematic diagram of a computer device 500 in an embodiment of the present application. The computer device 500 can implement all steps of the program expansion method in the above embodiment. The computer device 500 specifically includes the following contents:
[0083] Processor 501, memory 502, communications interface 503 and communication bus 504;
[0084] The processor 501, memory 502, and communication interface 503 communicate with each other via the communication bus 504; the communication interface 503 is used to implement information transmission between the server-side device, the detection device, the user-side device, and other related devices;
[0085] The processor 501 is used to call the computer program in the memory 502, and when the processor executes the computer program, all the steps in the image recognition method in the above embodiment are implemented.
[0086] An embodiment of the present application also provides a computer-readable storage medium that can implement all steps in the malicious program classification in the above embodiment. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the image recognition method in the above embodiment.
[0087] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the image recognition method in the above embodiment is implemented.
[0088] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0089] The user information in the embodiments of the present application is obtained through legal and compliant channels, and the acquisition, storage, use, and processing of the user information are authorized and agreed by the user.
[0090] Although the present invention provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many steps and does not represent the only execution order. When an actual device or client product is executed, the method can be executed sequentially or in parallel according to the embodiments or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment).
[0091] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0092] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0093] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0095] The present application has been described above in conjunction with specific embodiments. However, those skilled in the art should understand that these descriptions are merely illustrative and are not intended to limit the scope of protection of the present application. Those skilled in the art may make various modifications and variations to the present application based on the spirit and principles of the present application, and such modifications and variations are also within the scope of the present application.
Claims
1. A method for image recognition, characterized in that: The method comprises: Focus to select the effective part of the composition from the live view screen, Continuously shooting the composition including the effective portion to obtain at least two images, Using artificial intelligence (AI), a three-dimensional stereogram of the effective portion is identified from each of the at least two images, and the three-dimensional stereogram is segmented to obtain at least two image blocks, wherein the at least two image blocks have different shapes. retaining the effective portion and the background portion in the at least two images and deleting other portions other than the effective portion and the background portion, The at least two images are merged according to the at least two blocks of each image, the valid portion is reconstructed, and a picture is generated.
2. The method according to claim 1, wherein Reconstructing the effective portion includes: The at least two tiles contain position information of the valid portion, and the valid portion is reconstructed according to the position information.
3. The method according to claim 1, wherein The method further comprises, The effective parts in the at least two images are dynamically identified by using the artificial intelligence (AI) technology.
4. The method according to claim 3, wherein: Dynamically identifying the valid portion in the at least two images by using the artificial intelligence (AI) technology includes: It is identified that the valid portion includes a moving object or a stationary object based on at least one of the following information: angle information; altitude information; or latitude and longitude information.
5. The method according to claim 1, wherein The effective part includes scenery or portraits.
6. An image recognition device, characterized in that: The device comprises: A selection unit that performs focusing to select an effective portion of the composition from the live view screen, a shooting unit for continuously shooting the composition including the effective portion to obtain at least two images, a processing unit that uses artificial intelligence (AI) to identify a three-dimensional stereogram of the effective portion of each of the at least two images, segment the three-dimensional stereogram to obtain at least two image blocks, wherein the at least two image blocks have different shapes, retain the effective portion and background portion of the at least two images, and delete other portions other than the effective portion and background portion; A merging unit is configured to merge the at least two images according to the at least two blocks of each image, reconstruct the valid portion, and generate a picture.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and computer readable storage medium
CN111402135A