CN104951440B - Image processing method and electronic equipment - Google Patents

Image processing method and electronic equipment Download PDF

Info

Publication number
CN104951440B
CN104951440B CN201410111937.6A CN201410111937A CN104951440B CN 104951440 B CN104951440 B CN 104951440B CN 201410111937 A CN201410111937 A CN 201410111937A CN 104951440 B CN104951440 B CN 104951440B
Authority
CN
China
Prior art keywords
image
pixel
saliency
information
regions
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.)
Active
Application number
CN201410111937.6A
Other languages
Chinese (zh)
Other versions
CN104951440A (en
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410111937.6A priority Critical patent/CN104951440B/en
Publication of CN104951440A publication Critical patent/CN104951440A/en
Application granted granted Critical
Publication of CN104951440B publication Critical patent/CN104951440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an image processing method, which is applied to electronic equipment and comprises the following steps: acquiring first image information; performing first processing on the first image information to obtain N areas meeting preset conditions in the first image; extracting features of the N regions, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N regions; and retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results. The invention also discloses an electronic device.

Description

Image processing method and electronic equipment
Technical Field
The present invention relates to electronic technologies, and in particular, to an image processing method and an electronic device.
Background
The method is used for automatically finding similar scenes in a current shot image in a large number of pictures and is the basis of the environment perception and autonomous positioning technology of the robot. How to efficiently and accurately retrieve the scene contained in the current picture in the existing image feature database is a research hotspot in the robot vision field, and is also a bottleneck of applying the robot environment perception and autonomous positioning technology to the actual scene.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an image processing method and an electronic device to solve the problems in the prior art, which can eliminate a large amount of redundant background information and efficiently search a scene included in a current picture.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
an image processing method applied to an electronic device, the method comprising:
acquiring first image information;
performing first processing on the first image information to obtain N areas meeting preset conditions in the first image;
extracting features of the N regions, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N regions;
and retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results.
An electronic device comprising an acquisition unit, a processing unit, an extraction unit, and a matching unit, wherein:
the acquisition unit is used for acquiring first image information;
the processing unit is used for carrying out first processing on the first image information to obtain N areas meeting a preset condition in the first image;
the extracting unit is configured to perform feature extraction on the N regions, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N regions;
the matching unit is used for retrieving in an image feature database by using the at least one feature parameter, obtaining matching results with the N regions, and obtaining first scene information corresponding to the at least one feature parameter according to the matching results.
In the embodiment of the invention, first image information is obtained; then, carrying out first processing on the first image information to obtain N areas meeting preset conditions in the first image; extracting the characteristics of the N areas, wherein each area obtains at least one characteristic parameter; retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results; in this way, a large amount of redundant background information can be eliminated, and the scene included in the current picture can be efficiently retrieved.
Drawings
FIG. 1 is a schematic flow chart illustrating an implementation of an image processing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an implementation of a second image processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an implementation flow of a third image processing method according to an embodiment of the present invention;
FIG. 4-1 is a schematic flow chart of an implementation of a four-image processing method according to an embodiment of the present invention;
FIG. 4-2 is a schematic flow chart of the implementation of step 421 in FIG. 4-1;
FIGS. 4-3 and 4-4 are schematic diagrams illustrating the determination of the local area of each pixel in the fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a fifth electronic device according to an embodiment of the invention;
fig. 6 is a schematic structural diagram of a sixth electronic device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a seventh electronic device according to an embodiment of the invention;
fig. 8-1 is a first schematic structural diagram of an eighth electronic device according to an embodiment of the present invention;
fig. 8-2 is a schematic structural diagram of an eighth electronic device according to an embodiment of the invention;
fig. 8-3 is a schematic structural diagram of a first processing module according to an eighth embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
Example one
Fig. 1 is a schematic flow chart illustrating an implementation of an image processing method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, acquiring first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
102, performing first processing on the first image information to obtain N areas meeting a preset condition in the first image;
103, performing feature extraction on the N regions, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N regions;
here, the characteristic parameter includes at least one of the following characteristics: point features, statistical features such as histograms, Word bands (Bag of Word); besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
And 104, retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results.
In this embodiment of the present invention, after step 101 and before step 102, the method may further include: denoising the first image information; specifically, the first image information may be denoised by median filtering, bilateral filtering, gaussian filtering, or the like.
In the embodiment of the invention, first image information is obtained; then, carrying out first processing on the first image information to obtain N areas meeting preset conditions in the first image; extracting the characteristics of the N areas, wherein each area obtains at least one characteristic parameter; retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results; in this way, only N regions satisfying the predetermined condition can be acquired, thereby eliminating a large amount of redundant background information and efficiently searching for a scene included in the current picture.
Most of the existing methods directly extract the features of a target image, then describe the content of the target image, and realize scene recognition by matching the image features, thereby causing low retrieval efficiency; moreover, any existing technical scheme has certain limitations, such as the existing technical scheme can only reflect local information of the target image, such as a method based on point features, or can only describe a global image, such as a method based on statistical features or word bands. Compared with the prior art, the technical scheme provided by the embodiment of the invention has the advantages that after the concerned information or area is extracted, the characteristic description is carried out on the first image, so that the retrieval efficiency can be greatly improved, and enough information can be provided for describing the global scene and the local scene. Wherein extracting the information or region of interest may be achieved by setting a preset condition.
Example two
Based on the first embodiment of the present invention, an image processing method provided in the first embodiment of the present invention is applied to an electronic device, and fig. 2 is a schematic flow chart illustrating an implementation of a second image processing method in the second embodiment of the present invention, as shown in fig. 2, the method includes:
step 201, acquiring first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
Step 221, performing saliency detection processing on the first image information to obtain saliency information of the first image, and determining saliency values of all pixels according to the saliency information;
here, the saliency information includes color contrast information, which may be gray scale information or red, green, blue, RGB information, and/or luminance contrast information, and the like.
Step 222, obtaining N significant areas meeting a predetermined condition by processing the significant values of all the pixels;
step 203, performing feature extraction on each salient region, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N salient regions;
here, the process actually performed in step 203 is a process of area description, and the characteristic parameter includes at least one of the following characteristics: point features, statistical features such as histograms, Word bands (Bag of Word); wherein the histogram further comprises: color histograms, gradient histograms, etc.; besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
And 204, retrieving in an image feature database by using the at least one feature parameter, obtaining matching results with the N significant regions, and obtaining first scene information corresponding to the at least one feature parameter according to the matching results.
Here, the process performed by step 204 is actually a process of feature matching;
preferably, step 204 may also construct a k-d tree (k-dimensional tree) according to the features extracted for each salient region in step 203; and then using the k-d tree to quickly retrieve the scene information similar to each salient region.
The embodiment of the present invention provides a method for performing first processing on first image information to obtain N regions in a first image, where the N regions satisfy a predetermined condition, and the method includes: firstly, carrying out significance detection processing on the first image information to obtain significance information of the first image, and determining significance values of all pixels according to the significance information; then, obtaining N significant areas meeting a preset condition by processing the significant values of all the pixels; thus, the technical scheme provided by the invention has the following advantages: 1) the embodiment of the invention carries out scene recognition based on the visual saliency information, and the recognition result is closer to the perception psychology of people; 2) according to the embodiment of the invention, through respectively matching the N salient regions, the conditions of scene occlusion and simultaneous existence of a plurality of scenes can be effectively dealt with, and an optimal recognition result is obtained; 3) and a large amount of redundant background information is eliminated through significance detection, and the retrieval efficiency is improved.
EXAMPLE III
Based on the second embodiment of the present invention, an image processing method provided in the second embodiment of the present invention is applied to an electronic device, and fig. 3 is a schematic flow chart illustrating an implementation of the third image processing method in the second embodiment of the present invention, as shown in fig. 3, the method includes:
step 301, acquiring first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
Step 321, performing saliency detection processing on the first image information to obtain saliency information of the first image, and determining saliency values of all pixels according to the saliency information;
step 322, obtaining N saliency areas meeting a predetermined condition by processing the saliency values of all the pixels;
step 303, performing feature extraction on each salient region, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N regions;
here, the characteristic parameter includes at least one of the following characteristics: point features, statistical features such as histograms, word bands; besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
Step 304, retrieving in an image feature database by using the at least one feature parameter, obtaining matching results with the N regions, and obtaining first scene information corresponding to the at least one feature parameter according to the matching results;
305, performing significance strong and weak sequencing on the N significance regions according to a preset first sequencing principle to obtain a first sequencing result;
here, the first ordering rule may be a rule of ordering according to, for example, the size of the area of the saliency region, and/or the size of the saliency strong or weak within the saliency region, where the size of the saliency strong or weak may be determined by using the size of the saliency mean within the region.
Step 306, obtaining a scene recognition result of the first image according to the first sorting result and the N pieces of first scene information.
In this embodiment of the present invention, after step 101 and before step 102, the method may further include: denoising the first image information; specifically, the first image information may be denoised by median filtering, bilateral filtering, gaussian filtering, or the like.
In this embodiment of the present invention, step 305 may also be located after step 322 and before step 303; step 305 may in turn be located after step 303 and before step 304. Those skilled in the art may sequence the steps in the embodiments of the present invention appropriately according to their respective operating habits, which are not described herein again.
In the embodiment of the present invention, the results performed in step 305 and step 306 are actually a result fusion process. According to the technical scheme provided by the embodiment of the invention, for the condition that a plurality of significance regions exist at the same time, the significance regions can be sequenced according to a sequencing principle, and the final identification scene is obtained by fusing the matching results of the significance regions.
Example four
Based on the third embodiment of the present invention, an image processing method provided in an embodiment of the present invention is applied to an electronic device, and fig. 4-1 is a schematic flow chart of an implementation of a fourth image processing method in an embodiment of the present invention, as shown in fig. 4-1, the method includes:
step 401, acquiring first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
Step 421, for a first pixel, where the first pixel is each pixel in the first image, determining a local saliency value of the first pixel and a global saliency value of the first pixel by using first saliency information of the pixels in the first image, and determining saliency values of all the pixels according to the local saliency value of the first pixel and the global saliency value of the first pixel;
step 423, based on the second image, obtaining N significant regions meeting a predetermined condition by using a connected component analysis method, where the at least one feature parameter is used to describe the N significant regions;
step 403, performing feature extraction on each salient region, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N salient regions;
step 404, retrieving in an image feature database by using the at least one feature parameter, obtaining matching results with the N salient regions, and obtaining first scene information corresponding to the at least one feature parameter according to the matching results.
In the embodiment of the present invention, as shown in fig. 4-2, the step 421 includes steps 4211 to 4213, where:
step 4211, determining a local area of the first pixel, and determining a local saliency value of the first pixel using first saliency information of all pixels within the local area;
step 4212, determining a global saliency value of the first pixel using the first saliency information of all pixels in the first image;
step 4213, averaging the local saliency value of the first pixel and the global saliency value of the first pixel to obtain a saliency value of the first pixel;
here, the average in step 4213 may be an arithmetic average.
Here, for example, each of the small squares shown in FIGS. 4-3 represents a pixel point of the first image; for each pixel in the first image, respectively extending 2 pixels in four directions of the upper direction, the lower direction, the left direction and the right direction of the position of the pixel to be used as local areas of the pixel; as shown in fig. 4-4, except for the boundary pixel, the local area of the general pixel is actually a 5 × 5 area centered on the pixel.
Taking the pixel 40 in fig. 4-3 as an example, determining the local saliency value of the pixel 40 using the first saliency information of all pixels within the local area is explained: the local region of the pixel 40 is shown as QY40 in fig. 4-4, where the first saliency information is taken as color contrast information and the first image is assumed to be represented by RGB as an example, to illustrate the determination of the first saliency information for all the pixels within the local region QY 40. Firstly, calculating the average color contrast of the local area QY40, namely firstly counting the R values of all pixel points in the local area QY 40; then, averaging the color values of the R channels to obtain an average R value in a local area QY 40; and the rest is repeated to obtain the average G value and the average B value in the local area QY 40; secondly, combining the average R value, the average G value and the average B value of the local area QY40 to obtain the color information of the local area QY 40; finally, the color information of the local region QY40 is divided by the color information of the pixel 40 in association with each other, that is, the R value of the local region QY40 is divided by the R value of the pixel 40, thereby obtaining the color contrast value of the R channel of the pixel 40.
By analogy, the color contrast values of the G channel and the B channel of the pixel 40 may be obtained, and the color contrast values of the R channel, the G channel, and the B channel of the pixel 40 are combined to obtain the color contrast of the pixel 40 (the local saliency value of the pixel 40).
With reference to the above description of determining the local saliency value of the pixel 40, the global saliency value of the pixel 40 may be determined, and the saliency value of the pixel 40 may be obtained by arithmetically averaging the local saliency value of the pixel 40 and the global saliency value of the pixel 40.
By analogy, the saliency values of other pixels in the first image may be obtained. For the pixel points of the boundary, incomplete areas can be touched when corresponding local areas are determined; and averaging the incomplete region according to the number of the pixel points in the local region, so as to obtain the local significance value of the boundary pixel point.
Step 422, performing binarization processing on the first image according to the significance values of all pixels in the first image to obtain a second image;
here, the process of performing the second straightening on the first image may adopt the following manner (taking RGB color space as an example): in the first method, after the RGB color image is grayed, the pixel value of the first image is scanned, and the pixel value of the first image whose grayscale value is smaller than the set threshold value such as 127 is set to 0 (black), and the pixel value of the first image whose grayscale value is equal to or greater than the set threshold value such as 127 is set to 255 (white). The method has the advantages of less calculation amount and high speed. In the second method, after the RGB color image is grayed, the average value K of the pixels of the first image is calculated, and each pixel value of the scanned first image is 255 (white) as the pixel value is larger than K, and 0 (black) as the gray value is equal to or smaller than K. And thirdly, after graying the RGB color image, searching a binarization threshold value by using a histogram method, wherein the selection of the binarization threshold value by the histogram method mainly comprises the steps of finding two highest peaks of the image and then taking the lowest peak valley between the two peaks at the threshold value. This approach yields somewhat more accurate results than the first two approaches.
In an embodiment of the present invention, after step 404, the method further comprises steps a1 and a2,
a1, performing significance strong and weak sequencing on the N significance regions according to a preset first sequencing principle to obtain a first sequencing result;
step a2, obtaining a scene recognition result of the first image according to the first sorting result and the N first scene information.
EXAMPLE five
Fig. 5 is a schematic view of a composition structure of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes an obtaining unit 51, a processing unit 52, an extracting unit 53, and a matching unit 54, where:
the acquiring unit 51 is configured to acquire first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
The processing unit 52 is configured to perform first processing on the first image information to obtain N regions in the first image, where the N regions meet a predetermined condition;
the extracting unit 53 is configured to perform feature extraction on the N regions, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N regions;
here, the characteristic parameter includes at least one of the following characteristics: point features, statistical features such as histograms, word bands; besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
The matching unit 54 is configured to perform retrieval in an image feature database by using the at least one feature parameter, obtain matching results with the N regions, and obtain first scene information corresponding to the at least one feature parameter according to the matching results.
In the embodiment of the present invention, the electronic device may further include a denoising unit, configured to denoise the first image information; specifically, the first image information may be denoised by median filtering, bilateral filtering, gaussian filtering, or the like.
In the embodiment of the present invention, the obtaining unit 51 obtains first image information; the processing unit 52 performs a first process on the first image information to obtain N regions in the first image that satisfy a predetermined condition; the extracting unit 53 performs feature extraction on the N regions, and each region obtains at least one feature parameter; the matching unit 54 searches in an image feature database by using the at least one feature parameter, obtains matching results with the N regions, and obtains first scene information corresponding to the at least one feature parameter according to the matching results; in this way, only N regions satisfying the predetermined condition can be acquired, thereby eliminating a large amount of redundant background information and efficiently searching for a scene included in the current picture.
Most of the existing methods directly extract the features of a target image, then describe the content of the target image and realize scene recognition by matching the image features; compared with the prior art, the technical scheme provided by the embodiment of the invention can greatly improve the retrieval efficiency and can have enough information to describe the global scene and the local scene after extracting the concerned information or region. Wherein extracting the information or region of interest may be achieved by setting a preset condition.
EXAMPLE six
Based on the fifth embodiment of the present invention, fig. 6 is a schematic view of a composition structure of a sixth electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes an obtaining unit 61, a processing unit 62, an extracting unit 63, and a matching unit 64, where the processing unit 62 includes a first processing module 621 and a second processing module 622, where:
the acquiring unit 61 is configured to acquire first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
The first processing module 621 is configured to perform saliency detection processing on the first image information to obtain saliency information of the first image, and determine saliency values of all pixels according to the saliency information;
here, the saliency information includes color contrast information, which may be gray scale information or red, green, blue, RGB information, and/or luminance contrast information, and the like.
The second processing module 622 is configured to obtain N saliency areas meeting a predetermined condition by processing the saliency values of all the pixels;
the extracting unit 63 is configured to perform feature extraction on each salient region, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N salient regions;
here, the process actually performed by the extraction unit 63 is a process of area description, and the feature parameters include at least one of the following features: point features, statistical features such as histograms, word bands; wherein the histogram further comprises: color histograms, gradient histograms, etc.; besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
The matching unit 64 is configured to retrieve the image feature database by using the at least one feature parameter, obtain matching results with the N significant regions, and obtain first scene information corresponding to the at least one feature parameter according to the matching results.
Here, the process performed by the matching unit 64 is actually a process of feature matching;
preferably, the matching unit 64 may also construct a k-d tree according to the features extracted for each salient region in the extracting unit 63; and then using the k-d tree to quickly retrieve the scene information similar to each salient region.
The embodiment of the present invention provides a method for performing first processing on first image information to obtain N regions in a first image, where the N regions satisfy a predetermined condition, and the method includes: firstly, carrying out significance detection processing on the first image information to obtain significance information of the first image, and determining significance values of all pixels according to the significance information; then, obtaining N significant areas meeting a preset condition by processing the significant values of all the pixels; thus, the technical scheme provided by the invention has the following advantages: 1) the embodiment of the invention carries out scene recognition based on the visual saliency information, and the recognition result is closer to the perception psychology of people; 2) according to the embodiment of the invention, through respectively matching the N salient regions, the conditions of scene occlusion and simultaneous existence of a plurality of scenes can be effectively dealt with, and an optimal recognition result is obtained; 3) and a large amount of redundant background information is eliminated through significance detection, and the retrieval efficiency is improved.
EXAMPLE seven
Based on sixth implementation of the present invention, fig. 7 is a schematic view of a composition structure of an electronic device according to a seventh embodiment of the present invention, and as shown in fig. 7, the electronic device includes an obtaining unit 71, a processing unit 72, an extracting unit 73, a matching unit 74, a sorting unit 75, and a fusing unit 76, where the processing unit 72 includes a first processing module 721 and a second processing module 722, where:
the acquiring unit 71 is configured to acquire first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
The first processing module 721 is configured to perform saliency detection processing on the first image information to obtain saliency information of the first image, and determine saliency values of all pixels according to the saliency information;
the second processing module 722 is configured to obtain N saliency areas meeting a predetermined condition by processing the saliency values of all the pixels;
the extracting unit 73 is configured to perform feature extraction on each of the salient regions, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N salient regions;
here, the characteristic parameter includes at least one of the following characteristics: point features, statistical features such as histograms, word bands; besides the above listed feature parameters, those skilled in the art can extract other features from the N regions according to various existing technologies, and details are not described here.
The matching unit 74 is configured to perform retrieval in an image feature database by using the at least one feature parameter, obtain matching results with the N significant regions, and obtain first scene information corresponding to the at least one feature parameter according to the matching results;
the sorting unit 75 is configured to perform significance strong and weak sorting on the N significance regions according to a preset first sorting principle to obtain a first sorting result;
here, the first ordering rule may be a rule of ordering according to, for example, the size of the area of the saliency region, and/or the size of the saliency strong or weak within the saliency region, where the size of the saliency strong or weak may be determined by using the size of the saliency mean within the region.
The fusion unit 76 is configured to obtain a scene identification result of the first image according to the first sorting result and the N pieces of first scene information.
In the embodiment of the present invention, the electronic device may further include a denoising unit, configured to denoise the first image information; specifically, the first image information may be denoised by median filtering, bilateral filtering, gaussian filtering, or the like.
In the embodiment of the present invention, the results performed by the sorting unit 75 and the merging unit 76 are actually the process of result merging. According to the technical scheme provided by the embodiment of the invention, for the condition that a plurality of significance regions exist at the same time, the significance regions can be sequenced according to a sequencing principle, and the final identification scene is obtained by fusing the matching results of the significance regions.
Example eight
Based on the seventh implementation of the present invention, fig. 8-1 is a schematic view of a first composition structure of an eighth electronic device according to an embodiment of the present invention, and as shown in fig. 8-1, the electronic device includes an obtaining unit 81, a processing unit 82, an extracting unit 83, and a matching unit 84, where the processing unit 82 includes a first processing module 821 and a second processing module, and the second processing module includes a first processing sub-module 822 and a second processing sub-module 823, where:
the acquiring unit 81 is configured to acquire first image information;
here, the first image information may include at least one of the following information per pixel in the first image, such as: color, saturation, hue, brightness. The first image may be stored in a local electronic device or may be obtained by accessing a remote server.
The first processing module 821 is configured to, for a first pixel, where the first pixel is each pixel in the first image, determine a local saliency value of the first pixel and a global saliency value of the first pixel by using first saliency information of the pixels in the first image, and determine saliency values of all the pixels according to the local saliency value of the first pixel and the global saliency value of the first pixel;
the first processing submodule 823 is configured to perform binarization processing on the first image according to the significance values of all pixels in the first image to obtain a second image;
here, the process of performing the second straightening on the first image may adopt the following manner (taking RGB color space as an example): in the first method, after the RGB color image is grayed, the pixel value of the first image is scanned, and the pixel value of the first image whose grayscale value is smaller than the set threshold value such as 127 is set to 0 (black), and the pixel value of the first image whose grayscale value is equal to or greater than the set threshold value such as 127 is set to 255 (white). The method has the advantages of less calculation amount and high speed. In the second method, after the RGB color image is grayed, the average value K of the pixels of the first image is calculated, and each pixel value of the scanned first image is 255 (white) as the pixel value is larger than K, and 0 (black) as the gray value is equal to or smaller than K. And thirdly, after graying the RGB color image, searching a binarization threshold value by using a histogram method, wherein the selection of the binarization threshold value by the histogram method mainly comprises the steps of finding two highest peaks of the image and then taking the lowest peak valley between the two peaks at the threshold value. This approach yields somewhat more accurate results than the first two approaches.
The second processing submodule 824 is configured to obtain, based on the second image, N significant regions that satisfy a predetermined condition by using a connected component analysis method;
the extracting unit 83 is configured to perform feature extraction on each of the salient regions, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N salient regions;
the matching unit 84 is configured to perform retrieval in an image feature database by using the at least one feature parameter, obtain matching results with the N significant regions, and obtain first scene information corresponding to the at least one feature parameter according to the matching results.
In this embodiment of the present invention, as shown in fig. 8-2, the electronic device may further include a sorting unit 85 and a fusing unit 86, where:
the sorting unit 85 is configured to perform significance strong and weak sorting on the N significance regions according to a preset first sorting principle to obtain a first sorting result;
the fusion unit 86 is configured to obtain a scene identification result of the first image according to the first sorting result and the N pieces of first scene information.
In an embodiment of the present invention, as shown in fig. 8-3, the first processing module 821 includes a first determining sub-module 8211, a second determining sub-module 8212, and an averaging sub-module 8213, where:
the first determining submodule 8211 is configured to determine a local area of the first pixel, and determine a local saliency value of the first pixel by using first saliency information of all pixels in the local area;
the second determining sub-module 8212 is configured to determine a global saliency value of the first pixel using the first saliency information of all pixels in the first image;
the averaging submodule 8213 is configured to average the local saliency value of the first pixel and the global saliency value of the first pixel to obtain the saliency value of the first pixel.
Here, for example, each of the small squares shown in FIGS. 4-3 represents a pixel point of the first image; for each pixel in the first image, respectively extending 2 pixels in four directions of the upper direction, the lower direction, the left direction and the right direction of the position of the pixel to form a local area of the pixel; as shown in fig. 4-4, except for the border pixels, the local area of the general pixels is actually a 5 × 5 area.
Taking the pixel 40 in fig. 4-3 as an example, the local area of the pixel 40 is QY40 shown in fig. 4-4, and the first saliency information of all pixels within the local area determines the local saliency value of the pixel 40, including the following processes:
here, the first saliency information is taken as color contrast information, and the first image is assumed to be represented by RGB as an example, to describe the first saliency information for determining all the pixel points in the local area QY 40; firstly, calculating the average color contrast of the local area QY40, namely firstly counting the R values of all pixel points in the local area QY40, and then averaging the color values of R channels to obtain the average R value in the local area QY 40; and the rest is repeated to obtain the average G value and the average B value in the local area QY 40; secondly, combining the average R value, the average G value and the average B value of the local area QY40 to obtain the color information of the local area QY 40; finally, the color information of the local region QY40 is divided by the color information of the pixel 40 in association with each other, that is, the R value of the local region QY40 is divided by the R value of the pixel 40, thereby obtaining the color contrast value of the R channel of the pixel 40.
By analogy, the color contrast values of the G channel and the B channel of the pixel 40 may be obtained, and the color contrast values of the R channel, the G channel, and the B channel of the pixel 40 are combined to obtain the color contrast of the pixel 40 (the local saliency value of the pixel 40).
With reference to the above description of determining the local saliency value of the pixel 40, the global saliency value of the pixel 40 may be determined, and the saliency value of the pixel 40 may be obtained by arithmetically averaging the local saliency value of the pixel 40 and the global saliency value of the pixel 40.
By analogy, the saliency values of other pixels in the first image may be obtained. For the pixel points of the boundary, incomplete areas can be touched when corresponding local areas are determined; and averaging the incomplete region according to the number of the pixel points in the local region, so as to obtain the local significance value of the boundary pixel point.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. An image processing method applied to an electronic device, the method comprising:
acquiring first image information;
performing first processing on the first image information to obtain N areas meeting preset conditions in the first image;
extracting features of the N regions, wherein each region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N regions; wherein the characteristic parameters comprise at least one of the following parameters: point characteristics, statistical characteristics, word bands;
retrieving in an image feature database by using the at least one feature parameter to obtain matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results;
carrying out significance strong and weak sequencing on the N regions according to a preset first sequencing principle to obtain a first sequencing result;
obtaining a scene recognition result of the first image according to the first sequencing result and N pieces of first scene information corresponding to the N pieces of regions; wherein the recognition result is used for indicating the scene of the image in the image characteristic database which is matched with the scene of the first image.
2. The method according to claim 1, wherein the performing the first processing on the first image information to obtain N regions in the first image that satisfy a predetermined condition comprises:
performing saliency detection processing on the first image information to obtain saliency information of the first image, and determining saliency values of all pixels according to the saliency information;
obtaining N significant areas meeting a preset condition by processing the significant values of all the pixels;
correspondingly, the performing feature extraction on the N regions, where each region obtains at least one feature parameter, where the at least one feature parameter is used to describe the N regions, includes:
and performing feature extraction on each salient region, wherein each salient region obtains at least one feature parameter, and the at least one feature parameter is used for describing the N salient regions.
3. The method according to claim 2, wherein the performing the saliency detection processing on the first image information to obtain saliency information of the first image, and determining the saliency values of all the pixels according to the saliency information comprises:
for a first pixel, the first pixel being each pixel in the first image, determining a local saliency value of the first pixel and a global saliency value of the first pixel using first saliency information of pixels in the first image, respectively, and determining saliency values of all pixels according to the local saliency value of the first pixel and the global saliency value of the first pixel;
correspondingly, through processing the significance values of all the pixels, obtaining N significance regions meeting a predetermined condition, including:
according to the significance values of all pixels in the first image, carrying out binarization processing on the first image to obtain a second image;
and obtaining N significant regions meeting a preset condition by utilizing a connected domain analysis method based on the second image.
4. The method of claim 3, wherein for a first pixel, determining a local saliency value of the first pixel and a global saliency value of the first pixel using first saliency information of pixels in the first image, and determining a saliency value of the first pixel from the local saliency value of the first pixel and the global saliency value of the first pixel comprises:
determining a local area of the first pixel and determining a local saliency value of the first pixel using first saliency information of all pixels within the local area;
determining a global saliency value for the first pixel using first saliency information for all pixels in the first image;
and averaging the local saliency value of the first pixel and the global saliency value of the first pixel to obtain the saliency value of the first pixel.
5. An electronic device comprising an acquisition unit, a processing unit, an extraction unit, and a matching unit, wherein:
the acquisition unit is used for acquiring first image information;
the processing unit is used for carrying out first processing on the first image information to obtain N areas meeting a preset condition in the first image;
the extracting unit is configured to perform feature extraction on the N regions, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N regions; wherein the characteristic parameters comprise at least one of the following parameters: point characteristics, statistical characteristics, word bands;
the matching unit is used for retrieving in an image feature database by using the at least one feature parameter, obtaining matching results with the N regions, and acquiring first scene information corresponding to the at least one feature parameter according to the matching results;
the electronic equipment further comprises a fusion unit, a fusion unit and a fusion unit, wherein the fusion unit is used for performing significance strong and weak sequencing on the N areas according to a preset first sequencing principle to obtain a first sequencing result; obtaining a scene recognition result of the first image according to the first sequencing result and the N pieces of first scene information; wherein the recognition result is used for indicating the scene of the image in the image characteristic database which is matched with the scene of the first image.
6. The electronic device of claim 5, wherein the processing unit comprises a first processing module and a second processing module, wherein:
the first processing module is used for performing significance detection processing on the first image information to obtain significance information of the first image, and determining significance values of all pixels according to the significance information;
the second processing module is used for processing the saliency values of all the pixels to obtain N saliency areas meeting a preset condition;
correspondingly, the extracting unit is configured to perform feature extraction on each salient region, where each region obtains at least one feature parameter, and the at least one feature parameter is used to describe the N salient regions.
7. The electronic device of claim 6, wherein the first processing module is configured to, for a first pixel, which is each of the pixels in the first image, determine a local saliency value of the first pixel and a global saliency value of the first pixel by using first saliency information of the pixels in the first image, and determine the saliency values of all the pixels according to the local saliency value of the first pixel and the global saliency value of the first pixel;
correspondingly, the second processing module comprises a first processing sub-module and a second processing sub-module, wherein:
the first processing submodule is used for carrying out binarization processing on the first image according to the significance values of all pixels in the first image to obtain a second image;
and the second processing submodule is used for obtaining N significant areas meeting preset conditions by using a connected domain analysis method based on the second image.
8. The electronic device of claim 7, wherein the first processing module comprises a first determination submodule, a second determination submodule, and an averaging submodule, wherein:
the first determining submodule is used for determining a local area of the first pixel and determining a local saliency value of the first pixel by using first saliency information of all pixels in the local area;
the second determining submodule is used for determining a global significance value of the first pixel by utilizing the first significance information of all pixels in the first image;
the averaging submodule is configured to average the local saliency value of the first pixel and the global saliency value of the first pixel to obtain the saliency value of the first pixel.
CN201410111937.6A 2014-03-24 2014-03-24 Image processing method and electronic equipment Active CN104951440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410111937.6A CN104951440B (en) 2014-03-24 2014-03-24 Image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410111937.6A CN104951440B (en) 2014-03-24 2014-03-24 Image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN104951440A CN104951440A (en) 2015-09-30
CN104951440B true CN104951440B (en) 2020-09-25

Family

ID=54166103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410111937.6A Active CN104951440B (en) 2014-03-24 2014-03-24 Image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN104951440B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872408A (en) * 2015-12-04 2016-08-17 乐视致新电子科技(天津)有限公司 Image processing method and device
CN106295693B (en) * 2016-08-05 2019-06-07 杭州励飞软件技术有限公司 A kind of image-recognizing method and device
CN106780513B (en) * 2016-12-14 2019-08-30 北京小米移动软件有限公司 The method and apparatus of picture conspicuousness detection
CN107067030A (en) * 2017-03-29 2017-08-18 北京小米移动软件有限公司 The method and apparatus of similar pictures detection
CN108733679B (en) * 2017-04-14 2021-10-26 华为技术有限公司 Pedestrian retrieval method, device and system
CN108024105A (en) * 2017-12-14 2018-05-11 珠海市君天电子科技有限公司 Image color adjusting method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1145276A (en) * 1997-07-29 1999-02-16 N T T Data:Kk Information visualization method, information visualization system and recording medium
CN102129693A (en) * 2011-03-15 2011-07-20 清华大学 Image vision significance calculation method based on color histogram and global contrast
CN102254015A (en) * 2011-07-21 2011-11-23 上海交通大学 Image retrieval method based on visual phrases
CN102663714A (en) * 2012-03-28 2012-09-12 中国人民解放军国防科学技术大学 Saliency-based method for suppressing strong fixed-pattern noise in infrared image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1145276A (en) * 1997-07-29 1999-02-16 N T T Data:Kk Information visualization method, information visualization system and recording medium
CN102129693A (en) * 2011-03-15 2011-07-20 清华大学 Image vision significance calculation method based on color histogram and global contrast
CN102254015A (en) * 2011-07-21 2011-11-23 上海交通大学 Image retrieval method based on visual phrases
CN102663714A (en) * 2012-03-28 2012-09-12 中国人民解放军国防科学技术大学 Saliency-based method for suppressing strong fixed-pattern noise in infrared image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
利用视觉显著性的图像分割方法;张巧荣等;《中国图象图形学报》;20110531;正文第767页-第771页 *
吴伟文.基于计算机视觉的目标图像检索相关技术的研究.《中国博士学位论文全文数据库 信息科技辑》.2013,第47页-第48页,第58页,图4-1. *
基于计算机视觉的目标图像检索相关技术的研究;吴伟文;《中国博士学位论文全文数据库 信息科技辑》;20130515;正文第47页-第48页,第58页,图4-1 *

Also Published As

Publication number Publication date
CN104951440A (en) 2015-09-30

Similar Documents

Publication Publication Date Title
CN104951440B (en) Image processing method and electronic equipment
CN107346409B (en) pedestrian re-identification method and device
CN107833213B (en) Weak supervision object detection method based on false-true value self-adaptive method
JP4553650B2 (en) Image group representation method, descriptor derived by representation method, search method, apparatus, computer program, and storage medium
EP3499414B1 (en) Lightweight 3d vision camera with intelligent segmentation engine for machine vision and auto identification
CN109960742B (en) Local information searching method and device
WO2019071664A1 (en) Human face recognition method and apparatus combined with depth information, and storage medium
CN105184238A (en) Human face recognition method and system
US20090304271A1 (en) Object region extracting device
CN109409377B (en) Method and device for detecting characters in image
US9916513B2 (en) Method for processing image and computer-readable non-transitory recording medium storing program
CN106991370B (en) Pedestrian retrieval method based on color and depth
EP2639745A1 (en) Object identification in images or image sequences
WO2019197021A1 (en) Device and method for instance-level segmentation of an image
CN106780428B (en) Chip quantity detection method and system based on color recognition
CN111914762A (en) Gait information-based identity recognition method and device
CN112307994A (en) Obstacle identification method based on sweeper, electronic device and storage medium
CN113228105A (en) Image processing method and device and electronic equipment
CN111353385A (en) Pedestrian re-identification method and device based on mask alignment and attention mechanism
CN108109164B (en) Information processing method and electronic equipment
CN114119695A (en) Image annotation method and device and electronic equipment
CN116778533A (en) Palm print full region-of-interest image extraction method, device, equipment and medium
Avazov et al. Automatic moving shadow detection and removal method for smart city environments
CN105989063A (en) Video retrieval method and device
CN114387670A (en) Gait recognition method and device based on space-time feature fusion and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant