The present invention relates to the technology of image processing, and particularly to method and device for identifying a target object in an image.
At present, when viewing an image, only the pattern which is formed by original shot can be viewed directly, and in some special application scenarios, users want to be able to focus on viewing a certain object in a group of images, for example, it is likely to focus on viewing buildings in images in an architectural research.
If a user needs to focus on viewing a certain object in images, he can only artificially search the object in the images, so that it is likely to make omissions, with poor user experience.
Embodiments of the present invention provide method and device for identifying a target object in an image, so as to implement identification and highlighting for the target object in the image.
According to an aspect of the present invention, a method for identifying a target object in an image is provided, the method includes:
According to another aspect of the present invention, a device for identifying a target object in an image is provided, the device includes:
Embodiments of the present invention provide method and device for identifying a target object in an image. The method includes: the points on the image are divided into a plurality of subsets according to areas and lines on an image; then the data matching on the data in each subset with the data of a target object which is stored in a database is conducted, so as to the target object corresponding to the data in the database is selected from the image; then the areas and lines corresponding to subsets which go beyond a set threshold are highlighted, therefore, the target object is highlighted, thereby the target object in the image is identified and highlighted.
Embodiments of the present invention provide method and device for identifying a target object in an image. The method includes: the points on the image are divided into a plurality of subsets according to areas and lines on an image; then the data matching on the data in each subset with the data of a target object which is stored in a database is conducted, so as to the target object corresponding to the data in the database is selected from the image; then the areas and lines corresponding to subsets which go beyond a set threshold are highlighted, therefore, the target object is highlighted, thereby the target object in the image is identified and highlighted.
As shown in
Hence, when the image is need to be displayed, firstly the image is analyzed and the data of areas and lines matching the data in the database are determined, and then the areas and lines are highlighted, so as to facilitate the user to identify the target object.
In the step S101, an image analysis is performed so as the points on the image are divided into different subsets, which include isolated points, continuous curves or continuous areas. The common methods for image analysis include LOG (Laplacian of Gaussian), Otsu (Maximum Between-Class Variance) algorithm, Bernsen (Bernsen algorithm), and LEVBB (Local Extreme Value Based Binarization), etc.
Here, Otsu algorithm will produce a binaryzation error to a histogram which is a single-peak or multi-peak image with staggered target and background pixel gray values; Bernsen algorithm can correct binaryzation, but it will produce a large number of ghosts, is sensitive to noise, and has disadvantages and problems such as partial missing of target and ghost; and LEVBB algorithm has better results, can effectively eliminate ghosts produced by Bernsen algorithm, and is insensitive to noise, but under strong illumination variation, part of results will be incorrect, and adhesion of characters in the text will occur.
LOG algorithm can resist strong illumination variation and noise interference, and well keep the original shape of the target, so as to obtain better effect. Detecting the edge zero crossing of image using LOG algorithm, determining the pixels at two sides of the edge zero crossing point to be a target or a background, and determining the attribution of homogeneous areas (background or target) in the image according to the neighborhood attributes. The method can overcome the problem of partial missing of target and ghosts in Bernsen, and it also overcome the disadvantage of Otsu algorithm of susceptibility to noise and uneven illumination, and LOG algorithm has better effect than LEVBB algorithm.
In the case that the system has high levels in aspects such as processing speed, memory capacity and stability, LOG characteristic point would be an ideal choice, and subset dividing can be implemented by extracting LOG characteristic points.
Thus, in the step S101, the step of analyzing an image and dividing points on the image into a plurality of subsets according to areas and lines on the image specifically includes:
Accordingly, in the step S102, LOG characteristic sample data of a specific target object are stored in the database and the stored sample data cover the influences of various environmental changes (scale, rotation, illumination, blocking, etc.) on the image, and generally, the stored sample data can ensure the changes having high adaptability and robustness. For example, if performing supervised learning for the LOG characteristic sample of the image using a Ferns classifier constituted by a decision-making tree structure, it can further ensure that the stored sample data can ensure the changes having high adaptability and robustness.
In the step S103, the step of highlighting areas and lines corresponding to the subsets which go beyond the set threshold specifically includes:
Here, when performing enhanced rendering, the data input to a renderer may be position matrix, and the data output from the renderer may be image data after enhanced rendering.
For the identified target object, the relevant information can be displayed, i.e., the information corresponding to the subsets which go beyond the set threshold is displayed. The relevant information contains characters, images, videos, and audios. When no relevant information is stored in the database, a user may input the relevant information, and at this time, before the step of displaying the information corresponding to the subsets which go beyond the set threshold, the following steps is also included:
Certainly, there are many methods for highlighting the target object, e.g., displaying special marks and outlining with boxes, which are not described herein exhaustively.
When the image is a panoramic image, it needs to analyze each image frame in the panoramic image individually, specifically includes:
The method for identifying a target object in an image according to embodiments of the present invention will be described below in detail, with the identification for a target object in a panoramic image as an example, as shown in
The embodiments of the present invention also provides a device for identifying a target object in an image accordingly, as shown in
Here, the dividing unit 301 is specifically configured to analyze the image by Laplacian of Gaussian (LOG) algorithm, and divide points on the image into a plurality of subsets according to areas and lines on the image.
The displaying unit 303 is specifically configured to perform enhanced rendering for areas and lines corresponding to the subsets which go beyond the set threshold; and/or
The displaying unit 303 is specifically configured to display information corresponding to the subsets which go beyond the set threshold.
The displaying unit 303 is also configured to, before displaying the information corresponding to the subsets which go beyond the set threshold, acquire the information corresponding to the subsets which go beyond the set threshold from the database; or
The displaying unit 303 is configured to, before displaying the information corresponding to the subsets which go beyond the set threshold, acquire the information input by the user and corresponding to the subsets which go beyond the set threshold.
When the image is a panoramic image, the dividing unit 301 is specifically configured to analyze each frame in the panoramic image, and divide points on each image frame into a plurality of subsets according to areas and lines on the image; and
The displaying unit 303 is specifically configured to determine whether areas and lines, which are the same as the areas and lines corresponding to the subsets which go beyond the set threshold on the current image frame, are displayed on the previous image frame, if yes, the areas and lines corresponding to the subsets which go beyond the set threshold on the current image frame is not displayed, if no, the areas and lines corresponding to the subsets which go beyond the set threshold on the current image frame are highlighted.
Embodiments of the present invention provide method and device for identifying a target object in an image. The method includes: the points on the image are divided into a plurality of subsets according to areas and lines on an image; then the data matching on the data in each subset with the data of a target object which is stored in a database is conducted, so as to the target object corresponding to the data in the database is selected from the image; then the areas and lines corresponding to subsets which go beyond a set threshold are highlighted, therefore, the target object is highlighted, thereby the target object in the image is identified and highlighted.
A skilled person in the art will understand that an embodiment of the disclosure may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entire hardware embodiment, an entire software embodiment, or an embodiment combining software and hardware aspects. In addition, the present invention may take the form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, and an optical memory) containing computer-usable program codes.
The present disclosure is described with reference to a flowchart and/or a block diagram of a computer program product, an apparatus (system), and a method. It should be understood that each flow and/or block in the flowchart and/or the block diagram as well as combination of flows and/or blocks in the flowchart and/or the block diagram may be implemented via computer program instructions. These computer program instructions may be provided to a general computer, dedicated computer, embedded processor, or the processor of other programmable data processing apparatuses, to generate a machine, such that a device configured to implement the function designated in one or more flows in the flowchart and/or one or more blocks in the block diagram is generated through instructions executed by the processor of other programmable data processing apparatuses or a computer.
These computer program instructions can also be stored in computer readable storage capable of guiding a computer or other programmable data processing apparatuses to operate in a certain way, such that the instructions stored in the computer readable storage generate a manufacture including an instruction device which implements the function designated in one or more flows in the flowchart and/or one or more blocks in the block diagram.
These computer program instructions can also be loaded onto a computer or other programmable data processing apparatuses, so as to execute a series of operational steps on the computer (or other programmable data processing apparatuses) to generate computer-implemented processing, therefore the instructions executed on the computer (or other programmable apparatuses) provide the steps for implementing the function designated in one or more flows in the flowchart and/or one or more blocks in the block diagram.
Although preferred embodiments of the disclosure are described, a skilled person of the art may make alternative modifications and variations to these embodiments once he or she knows the basic inventive concept. Therefore, it is intended that the claims are interpreted as including the preferred embodiments and all modifications and variations falling within the scope of the disclosure.
Obviously, those skilled in the technical field can implement various modifications and improvements for the present invention, without departing from the scope of the present invention. Thus, if all the modifications and improvements belong to the scope of the claims of the present invention and the similar technologies thereof, the present invention is intended to contain the modifications and improvements.
Number | Date | Country | Kind |
---|---|---|---|
201210360651.2 | Sep 2012 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2013/083578 | 9/16/2013 | WO | 00 |