Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides an advertisement media image identification method, which can improve the advertisement identification accuracy.
The invention also aims to provide an advertisement media image identification system.
It is a further object of the present invention to provide an electronic device.
It is a further object of the present invention to provide a computer readable storage medium.
One of the purposes of the invention is realized by adopting the following technical scheme:
an advertising media image recognition method, comprising:
acquiring an advertisement image shot by a user terminal, identifying positioning information of the advertisement image, and screening out all advertisement information meeting position conditions in a database according to the positioning information;
identifying image features of the advertisement image, the image features including a target color having a maximum area; and screening out target advertisement information with the matched characteristics from all advertisement information meeting the position condition based on the image characteristics, and pushing the target advertisement information to the user terminal.
Furthermore, each piece of advertisement information pre-stored in the database comprises a placement picture, commodity information, an advertisement placement address and an area corresponding to each color in the placement picture.
Further, the method for determining the position condition includes:
taking the positioning information as an original point, and extending outwards by a preset radius to determine a primary screening position range;
and judging whether the database has the advertisement information of the advertisement putting address in the initially screened position range, if so, meeting the position condition, and screening all the advertisement information meeting the position condition from the database.
Further, the method for identifying the image features comprises the following steps:
and identifying the color value of each pixel point in the advertisement image, counting and comparing the number of the pixel points corresponding to each color numerical range, and determining the target color of the advertisement image according to the color numerical range with the largest number of the pixel points.
Further, the method for screening out the target advertisement information comprises the following steps:
traversing each advertisement information meeting the position condition, determining the color type with the largest area in each launched picture, comparing the color type with the largest area in each launched picture with the target color of the advertisement image, and marking the advertisement image as the target advertisement information if the comparison result is consistent.
Further, after the advertisement image is obtained, the method further includes:
acquiring a framing instruction, and determining a shielding area in the advertisement image according to the framing instruction; and when the image characteristics of the advertisement image are identified, the shielding area is removed, and the image characteristics of the image outside the shielding area are identified.
Further, if more than two pieces of the target advertisement information are screened out from all the advertisement information meeting the position condition, the method further comprises the following steps:
and identifying the type of the object in the watching area in the advertisement image, screening out one piece of target advertisement information of which the commodity information is consistent with the type of the object from the plurality of pieces of target advertisement information, and pushing the target advertisement information.
The second purpose of the invention is realized by adopting the following technical scheme:
an advertising media image recognition system for executing the above advertising media image recognition method, the system comprising:
the image identification module is used for acquiring an advertisement image shot by a user terminal and identifying the positioning information of the advertisement image and the image characteristics of the advertisement image; the image feature comprises a target color having a maximum area;
the first screening module is used for screening out all the advertisement information meeting the position condition in the database according to the positioning information;
and the second screening module is used for screening out target advertisement information with the consistent characteristics from all the advertisement information meeting the position conditions based on the image characteristics and pushing the target advertisement information to the user terminal.
The third purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the method of advertising media image recognition as described above when executing the computer program.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium on which a computer program is stored, which when executed, implements the advertising media image recognition method described above.
Compared with the prior art, the invention has the beneficial effects that:
according to the method, all advertisement information near the position is preliminarily determined according to the positioning information of the shot advertisement image, and the target advertisement information conforming to the color characteristics is further screened out by combining the color characteristics of the shot advertisement image; the invention can obtain the commodity information in the advertisement image through the color characteristics even if the advertisement image is fuzzy, thereby improving the accuracy of extracting the advertisement information.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The embodiment provides an advertising media image identification method, which can identify commodity information in an advertising image under the condition that a shot image is fuzzy, so that the identification accuracy is improved.
The method for identifying the advertisement media images is mainly applied to a cloud server, a user can be connected with the cloud server through a user terminal owned by the user, the user can upload the advertisement images and information carried by the advertisement images to the cloud server after shooting the advertisement images by using the user terminal, and the cloud server analyzes the shot advertisement images to determine commodity information corresponding to the advertisements.
As shown in fig. 1, the advertisement media image executed by the cloud server specifically includes the following steps:
step S1: acquiring an advertisement image shot by a user terminal, identifying positioning information of the advertisement image, and screening out all advertisement information meeting position conditions in a database according to the positioning information;
step S2: identifying image features of the advertisement image, the image features including a target color having a maximum area; and screening out target advertisement information with the matched characteristics from all advertisement information meeting the position condition based on the image characteristics, and pushing the target advertisement information to the user terminal.
After the user shoots the advertisement of a station or other advertisement putting points through the user terminal, the shot advertisement image can carry positioning information and camera parameters when the user shoots, the user can actively upload the advertisement image to the client, and the positioning information and the camera parameters are obtained and uploaded to the cloud server under the authorization condition of the user terminal.
And the cloud server determines the geographical position of the user when shooting according to the positioning information of the advertisement image, and screens out all advertisement information meeting the position condition according to the geographical position so as to perform preliminary screening.
Because the positioning information of the advertisement image may have positioning deviation and other situations, in the screening process, the geographical position of the advertisement image obtained by shooting is required to be taken as an origin, and a preset radius is extended outwards so as to determine the primary screening position range;
and then comparing the advertisement delivery address of each advertisement message pre-stored in the database with the primary screening position range, judging whether the database contains the advertisement messages of which the advertisement delivery addresses are in the primary screening position range, if so, meeting the position condition, and screening all the advertisement messages meeting the position condition from the database.
Before each advertisement is put, the information of each advertisement needs to be recorded into a database, and each advertisement information pre-stored in the database comprises a put picture, commodity information, an advertisement putting address and an area corresponding to each color numerical range in the put picture. Wherein, each color is predefined in color numerical range, for example, the color numerical range of red is between X1-X2, wherein X1 and X2 are RGB values; classifying red with different degrees such as pink, dark red, purple red and the like with the color numerical range of X1-X2 into red; and the area corresponding to each color range can be obtained by calculating the number of pixel points.
Even if the font of the shot advertisement image is fuzzy, the color feature in the advertisement image can be extracted, and the target advertisement information is determined according to the color feature. Specifically, the method comprises the following steps: after the advertisement image is obtained through shooting, the cloud server identifies the color value of each pixel point in the advertisement image, judges the color value of each pixel point falls into which color numerical range, counts the number of pixel points in each color numerical range, and marks the color corresponding to the color numerical range with the largest number of pixel points as a target color; assuming that the number of pixels with color values ranging from X1 to X2 in the advertisement image is the largest, red is the target color.
And traversing all the advertisement information meeting the position condition by the cloud server, determining the color type with the largest area in each launched picture, comparing the color type with the largest area in each launched picture with the target color of the advertisement image, and marking the advertisement information of the launched picture as the target advertisement information if the comparison result is consistent.
Assuming that the target color with the largest area in the shot advertisement image is red, at this time, the cloud server screens the advertisement information of the advertisement image with the largest red area from all the advertisement information meeting the position condition, marks the advertisement information of the advertisement image with the largest red area as target advertisement information, and pushes the target advertisement information to the user terminal of the user for display.
When the user shoots the advertisement image through the user terminal, other objects such as pedestrians, passing vehicles and the like may be shot; the method comprises the steps that objects such as pedestrians and vehicles also exist in a shot advertisement image, therefore, after the advertisement image is obtained, a user can use a client to check out the area of other objects in the advertisement image, the client generates a frame selection instruction at the moment, and a cloud server marks out a blocking area in the advertisement image according to the frame selection instruction after obtaining the frame selection instruction uploaded by the client; and when the image characteristics of the advertisement image are identified, the shielding area is removed, namely, the color characteristics of the image outside the shielding area are identified, so that the advertisement screening accuracy is improved.
In some embodiments, if more than two pieces of target advertisement information are screened from all the advertisement information meeting the position condition, pushing all the target advertisement information for a user to self-screen; if more than two pieces of target advertisement information are screened from all the advertisement information meeting the position condition and the shot advertisement image is clearer, the type of an article in a watching area in the advertisement image can be identified, wherein the watching area can be the central area of the advertisement image, namely the type of the article positioned in the central position in the advertisement image is identified, and one piece of target advertisement information with the commodity information according with the type of the article is screened from the target advertisement information and pushed.
Example two
An advertisement media image recognition system of this embodiment executes the advertisement media image recognition method according to the first embodiment, as shown in fig. 2, the system includes:
the image identification module is used for acquiring an advertisement image shot by a user terminal and identifying the positioning information of the advertisement image and the image characteristics of the advertisement image; the image feature comprises a target color having a maximum area;
the first screening module is used for screening out all the advertisement information meeting the position condition in the database according to the positioning information;
and the second screening module is used for screening out target advertisement information with the consistent characteristics from all the advertisement information meeting the position conditions based on the image characteristics and pushing the target advertisement information to the user terminal.
Preliminarily determining all advertisement information near the position according to the positioning information of the shot advertisement image, and further screening out target advertisement information conforming to the color characteristics by combining the color characteristics of the shot advertisement image; the invention can obtain the commodity information in the advertisement image through the color characteristics even if the advertisement image is fuzzy, thereby improving the accuracy of extracting the advertisement information.
In some embodiments, there is also provided an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the advertising media image recognition method of embodiment one when executing the computer program;
in addition, in some embodiments, a computer-readable storage medium is also provided, on which a computer program is stored, the computer program implementing the advertising media image recognition method according to the first embodiment when executed.
The above system, device and storage medium and the method in the foregoing embodiments are based on multiple aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the above system, device and storage medium according to the foregoing description, and for the sake of brevity of the description, no further description is provided here.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention should not be limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are intended to be covered by the claims.