CN110336943B - Scene recognition method and device - Google Patents

Scene recognition method and device Download PDF

Info

Publication number
CN110336943B
CN110336943B CN201910596008.1A CN201910596008A CN110336943B CN 110336943 B CN110336943 B CN 110336943B CN 201910596008 A CN201910596008 A CN 201910596008A CN 110336943 B CN110336943 B CN 110336943B
Authority
CN
China
Prior art keywords
frame image
scene recognition
current frame
similarity
scene
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
CN201910596008.1A
Other languages
Chinese (zh)
Other versions
CN110336943A (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.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii Technology Co 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 Beijing Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN201910596008.1A priority Critical patent/CN110336943B/en
Publication of CN110336943A publication Critical patent/CN110336943A/en
Application granted granted Critical
Publication of CN110336943B publication Critical patent/CN110336943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Abstract

The present disclosure relates to a scene recognition method and a device, wherein the scene recognition method comprises an acquisition step of acquiring a characteristic value of a frame image to be recognized, the frame image to be recognized comprises a current frame image and a previous frame image, and the previous frame image is an Nth frame image before the current frame image; a judging step of judging whether to execute the scene recognition step according to the comparison feature value similarity and a threshold value, wherein the feature value similarity is the similarity between the feature value of the current frame image and the feature value of the previous frame image; the scene recognition step includes performing scene recognition based on the current frame image. By the scene recognition method, the scene recognition times can be reduced, and further the power consumption is effectively reduced.

Description

Scene recognition method and device
Technical Field
The present disclosure relates to the field of scene recognition technologies, and in particular, to a scene recognition method and apparatus.
Background
For some devices with an image acquisition function, such as mobile phones with a shooting function, a scene recognition technology is often used to classify scenes previewed in real time after a camera is opened and previewed, different image exposure and processing modes are adopted according to different scene classification results, a preview effect closer to human eye perception is presented to a user, and a photo effect more vivid to human eyes is shot. In the process of camera preview, the camera performs scene recognition and result output on each frame of captured image data, so that the power consumption of the device is increased.
Disclosure of Invention
In order to overcome the problems in the prior art, the present disclosure provides a scene recognition method and apparatus.
In a first aspect, an embodiment of the present disclosure provides a scene identification method, which includes an obtaining step of obtaining a feature value of a frame image to be identified, where the frame image to be identified includes a current frame image and a previous frame image, and the previous frame image is an nth frame image before the current frame image; a judging step of judging whether to execute the scene recognition step according to the comparison feature value similarity and a threshold value, wherein the feature value similarity is the similarity between the feature value of the current frame image and the feature value of the previous frame image; the scene recognition step includes performing scene recognition based on the current frame image.
In one example, the determining step includes, according to the comparison between the similarity of the feature values and the threshold, executing the scene recognizing step if the similarity of the feature values is greater than the threshold; and if the similarity of the characteristic values is less than or equal to the threshold value, the scene identification step is not executed.
In one example, the previous frame image is a first frame image before the current frame image.
In one example, the obtaining step further comprises: acquiring the acquisition time of a current frame image, and obtaining the time interval between the acquisition time of the current frame image and the execution time of the last execution scene recognition step according to the acquisition time of the current frame image and the execution time of the last execution scene recognition step; the judging step comprises: judging whether to execute a scene recognition step or not according to the comparison characteristic value similarity and the threshold value and the comparison time interval and the interval threshold value; the scene recognition step further comprises: and acquiring and storing the execution time of executing the scene recognition step.
In one example, the time interval comprises a first interval threshold; the judging step comprises: according to the comparison of the similarity of the characteristic values and the threshold, if the similarity of the characteristic values is greater than the threshold, the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step executed last time is judged, and if the time interval is greater than or equal to a first interval threshold, the scene recognition step is executed; and if the time interval is smaller than the first interval threshold, not executing the scene identification step.
In one example, the interval threshold comprises a second interval threshold; the judging step comprises: according to the comparison of the similarity of the characteristic values and the threshold, if the similarity of the characteristic values is smaller than or equal to the threshold, judging the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step executed last time, and if the time interval is larger than a second interval threshold, executing the scene recognition step; and if the time interval is less than or equal to the second interval threshold, not executing the scene identification step.
In one example, the obtaining step further comprises: and extracting characteristic values of the current frame image and the previous frame image in a sampling mode, and taking the obtained characteristic values as the characteristic values of the current frame image and the previous frame image.
In one example, the feature value includes a luminance value of the frame image to be recognized or an RGB value of the frame image to be recognized.
In one example, the scene recognition method further includes: and a parameter generation step of generating shooting parameters for the image acquisition device to shoot images based on the scene recognition result obtained in the scene recognition step.
In a second aspect, an embodiment of the present disclosure provides a scene recognition apparatus, where the apparatus has a function of implementing the scene recognition method according to the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one example, a scene recognition apparatus includes an obtaining module, configured to obtain a feature value of a frame image to be recognized, where the frame image to be recognized includes a current frame image and a previous frame image, and the previous frame image is an nth frame image before the current frame image; the judging module is used for comparing the similarity of the characteristic values with a threshold value, wherein the similarity of the characteristic values is the similarity between the characteristic value of the current frame image and the characteristic value of the previous frame image; a scene recognition module: and the scene recognition module is used for recognizing the scene based on the data of the current frame image according to the comparison result of the similarity of the characteristic values and the threshold value.
In a third aspect, an embodiment of the present disclosure provides an electronic device, where the electronic device includes: a memory to store instructions; and a processor for calling the instructions stored in the memory to execute the scene recognition method of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when executed by a processor, performs the scene recognition method of the first aspect.
The disclosure provides a scene identification method and a scene identification device. When the camera previews, the scene recognition method calculates the feature value similarity between the feature value of the current frame image and the feature value of the previous frame image, compares the feature value similarity with a threshold value, and determines whether to perform scene recognition on the current frame image according to the comparison result. If the scene recognition of the current frame image is not needed, the scene of the previous frame image can be directly used as the scene of the current frame image, and the shooting parameters of the previous frame image are called to shoot the current frame image, so that the effect of reducing the power consumption of the camera is achieved by reducing the times of scene recognition.
Drawings
The above and other objects, features and advantages of the embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 is a schematic diagram illustrating a scene recognition method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating another scene recognition method provided by the embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a scene recognition method according to another embodiment of the disclosure;
fig. 4 is a schematic diagram illustrating a scene recognition apparatus provided by an embodiment of the present disclosure;
fig. 5 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
The principles and spirit of the present disclosure will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the present disclosure, and are not intended to limit the scope of the present disclosure in any way.
It should be noted that, although the expressions "first", "second", etc. are used herein to describe different modules, steps, data, etc. of the embodiments of the present disclosure, the expressions "first", "second", etc. are merely used to distinguish between different modules, steps, data, etc. and do not indicate a particular order or degree of importance. Indeed, the terms "first," "second," and the like are fully interchangeable.
Fig. 1 is a schematic diagram of a scene identification method according to an embodiment of the present disclosure. As shown in fig. 1, the recognition method 100 includes an acquisition step S101, a judgment step S102, and a scene recognition step S103.
As a possible embodiment, the feature value of the frame image to be recognized may be acquired through the acquisition step S101. The frame image to be identified comprises a current frame image and a previous frame image, wherein the previous frame image is the Nth frame image before the current frame image. In the determining step S102, it is determined whether to execute the scene recognition step according to the comparison feature value similarity and the threshold. The feature value similarity refers to obtaining a feature value similarity between a feature value of a current frame image and a feature value of a previous frame image, where the feature value similarity may be a feature value difference between the two.
The scene recognition step S103 is to perform scene recognition on the scene of the current frame image according to the current frame image.
It should be noted that, in practical application, scene recognition may be performed on the current frame image through a neural network recognition algorithm. The previous frame image is the previous nth frame image of the current frame image, wherein the value of "N" of the previous nth frame can be determined according to actual conditions. In practical applications, if the requirement on the accuracy of scene recognition is high, the size of the "N" value may be reduced appropriately, that is, the previous frame image is the previous nth frame image closer to the current frame image, for example, the previous third frame image, or the previous second frame image. If the requirement on the accuracy of scene recognition is high, the size of the "N" value can be increased appropriately to reduce the calculation amount of the similarity of the feature values.
In the determining step S102, the feature value refers to a value that can be used to characterize each frame of image and is specific to the frame of image. Depending on the type of characterization, the values specific to the frame of image are correspondingly different. If the current frame image is represented by a value corresponding to a certain representation type and being dedicated to the current frame image, the previous frame image is also correspondingly represented by a value corresponding to the representation type and being dedicated to the previous frame image.
For example, the current frame image selects the corresponding brightness value as the feature value of the current frame image, and correspondingly, the previous frame image also needs to select the corresponding brightness value as the feature value of the previous frame image. Similarly, the difference of the feature values between the current frame image and the previous frame image, that is, the similarity of the feature values between the two images, can be obtained by calculating the brightness value of the current frame image and the brightness value of the previous frame image.
It should be further noted that, in one aspect, the threshold may vary in magnitude depending on the type of characterization selected for the feature value. That is, for the current frame image and the previous frame image, the respective luminance values are selected as the feature values, and the threshold size corresponding to the luminance value as the feature value and the threshold size corresponding to the luminance value not used as the feature value may be different. On the other hand, the threshold value may vary depending on the actual situation.
It is further emphasized that when the first frame image is acquired as the current frame image, since the first frame image has no previous frame image, scene recognition will be performed directly from the data of the first frame image when the first frame image is acquired.
When the camera previews, the scene recognition method provided by the disclosure can determine whether to perform scene recognition on the current frame image according to the comparison result by calculating the feature value similarity between the feature value of the current frame image and the feature value of the previous frame image, comparing the feature value similarity with the threshold value. If the scene recognition of the current frame image is not needed, the scene of the previous frame image can be directly used as the scene of the current frame image, and the shooting parameters of the previous frame image are called to shoot the current frame image, so that the effect of reducing the power consumption of the camera is achieved by reducing the times of scene recognition.
In one possible embodiment, the determining step S102 includes determining whether to perform the scene recognition step S103 according to the comparison feature value similarity with a threshold. If the similarity of the feature values of the current frame image and the previous frame image is greater than the threshold, the difference of the image features between the current frame image and the previous frame image is considered to be large, and correspondingly, the scenes between the current frame image and the previous frame image are also different, so that the scene recognition step S103 is executed; if the similarity of the feature values of the current frame image and the previous frame image is less than or equal to the threshold, the difference between the image features of the current frame image and the previous frame image is considered to be small, and correspondingly, the scenes between the current frame image and the previous frame image are also approximately the same, so the scene recognition step S103 is not executed.
In one possible embodiment, in order to improve the accuracy of scene recognition, the previous frame image may be the first frame image before the current frame image, i.e., the previous frame image of the current frame image. That is, whether to perform the scene recognition step S103 is determined by comparing the degree of similarity of feature values between the current frame image and the previous frame image of the current frame image with the magnitude relation of the threshold value.
In order to improve the efficiency and accuracy of scene recognition, in practical applications, on the basis of comparing the similarity of the feature values with the threshold, the relationship between the interval between the acquisition time of the current frame image and the execution time of the last scene recognition step and the interval threshold may be further compared. And based on this, it is determined whether to execute the scene recognition step S103.
Therefore, in a possible embodiment, the obtaining step S101 further includes obtaining an acquisition time of the current frame image, and obtaining a time interval between the acquisition time of the current frame image and the execution time of the scene recognition step executed last time. The determining step S102 includes determining whether to perform the scene recognition step S103 according to the comparison feature value similarity and the threshold, and the comparison time interval and the interval threshold.
Possible embodiments of the above-described solution will be described in detail below.
According to the judgment result of the similarity of the characteristic values of the current frame image and the previous frame image, if the similarity of the characteristic value of the current frame image and the characteristic value of the previous frame image is small, the scene of the current frame image needs to be re-identified. However, if the time interval is short before the acquisition time of the current frame image, the time interval may be understood as a short time interval, for example, within 400ms, and the scene recognition method 100 has just completed the scene recognition step. In practical applications, it is theoretically assumed that although the scene of the current frame image is different from that of the previous frame image, the current frame image is not re-identified and the scene is not updated within a short time interval from the last scene identification step, and the user experience is not actually affected. Therefore, for this situation, in practical application, the current frame image does not need to be re-identified and the scene does not need to be updated, so that the number of times of scene identification is reduced, and the power consumption of the device is further reduced.
In view of the above situation, the present disclosure will also provide a description of corresponding embodiments.
In one possible embodiment, the time interval threshold comprises a first time interval threshold; the scene recognition method is not described herein again except for the above-mentioned obtaining step S101, determining step S102, and scene recognition step S103, and the obtaining step S101 and the determining step S102 have the following features.
The acquiring step S101 further includes acquiring the current frame image, that is, acquiring and recording the acquisition time of each acquired current frame image, which may be denoted as T1.
The determining step S102 includes determining whether to perform the scene recognition step S103 according to the comparison between the similarity of the feature values and the threshold. If the similarity of the feature values is greater than the threshold value, that is, the scene of the current frame image is theoretically different from the scene of the previous frame image, the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step S103 executed last time is continuously determined.
The execution time of the scene recognition step S103 is the time of the last scene recognition step S103 closest to the current frame image, and may be referred to as T2. Accordingly, the time interval between the acquisition time T1 of the current frame image and the execution time T2 at which the scene recognition step S103 was previously executed is T1 to T2.
If the time interval T1-T2 is greater than or equal to the first interval threshold, it is determined that the scenes between the current frame image and the previous frame image are different due to the similarity of the feature values, and then, the time interval T1-T2 between the acquisition time T1 of the current frame image and the execution time T2 of the last scene recognition step is not short enough, then the scene recognition step S103 will be executed for the previous frame image, that is, the scene recognition and update are performed on the previous frame image; if the time interval T1-T2 is smaller than the first interval threshold, the scene recognition step S103 is not performed.
It should be noted that the first time interval threshold is a short time interval, and the value can be adjusted according to different practical situations, and the first time interval threshold can be a value within 400 ms.
In the scene recognition method 100 provided by the present disclosure, if the similarity between the feature value of the current frame image and the feature value of the previous frame image is greater than the threshold, it may be considered that the difference between the image features of the previous frame image and the current frame image is large, and accordingly, the two scenes are different, that is, the scene of the previous frame image needs to be re-recognized. However, in practical applications, by further determining the difference T1-T2 between the acquisition time T1 of the previous frame image and the execution time T2 of the scene recognition step S103 executed the closest time to the current frame image, if T1-T2 is smaller than the first time threshold, it is considered that although the current frame image and the previous frame image have different scenes, the user experience is not affected even if the scenes are not updated for a short time, and thus the number of times of scene recognition is reduced, and the power consumption of the device is reduced.
Similarly, if the scene of the current frame image is basically the same as the scene of the previous frame image through the characteristic value similarity judgment, theoretically, the scene of the current frame image does not need to be identified again. However, if the time interval is a time period before the acquisition time of the current frame image, the time interval may be considered to be a time interval other than 2s, and the last scene recognition step is performed. In practical applications, although the current frame image and the previous frame image are considered to have similar scenes according to the judgment result, since scene recognition and updating are not performed for a long time, in order to ensure the practical effect, forced scene recognition and updating are performed on the current frame image, so as to further improve the accuracy of the practical result.
Accordingly, in view of the above, the present disclosure will provide corresponding embodiments for illustration.
In one possible embodiment, the time interval threshold comprises a second time interval threshold; the scene recognition method is not described herein again except for the above-mentioned obtaining step S101, determining step S102, and scene recognition step S103, and the obtaining step S101 and the determining step S102 have the following features.
The acquiring step S101 further includes acquiring the current frame image, that is, acquiring and recording the acquisition time of each acquired current frame image, which may be denoted as T1.
The determining step S102 includes determining whether to perform the scene recognition step S103 according to the comparison between the similarity of the feature values and the threshold. If the similarity of the feature values is smaller than or equal to the threshold value, that is, the scene of the current frame image is theoretically similar to the scene of the previous frame image, the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step S103 executed last time is continuously determined.
The execution time of the scene recognition step S103 is the time of the last scene recognition step S103 closest to the current frame image, and may be referred to as T2. Accordingly, the time interval between the acquisition time T1 of the current frame image and the execution time T2 at which the scene recognition step S103 was previously executed is T1 to T2.
If the time interval T1-T2 is greater than the second interval threshold, the scene recognition step S103 is executed, i.e. the scene recognition and update are performed on the previous frame image; if the time interval T1-T2 is less than or equal to the second interval threshold, the current frame image and the previous frame image are judged to be similar in scene due to the similarity of feature values, and then, the time interval T1-T2 between the acquisition time T1 of the current frame image and the execution time T2 of the last scene recognition step is not long enough, and then, for the current frame image, the scene recognition step S103 is not executed any more.
The second time interval threshold is a relatively long time interval, and the value of the second time interval threshold may be adjusted according to different actual situations, and the second time interval threshold may be a value other than 2 s.
In the scene recognition method 100 provided by the present disclosure, if the similarity between the feature value of the current frame image and the feature value of the previous frame image is less than or equal to the threshold, it may be considered that the image characteristics between the previous frame image and the current frame image are not greatly different, and accordingly, the scenes of the previous frame image and the current frame image may also be considered to be substantially the same, and theoretically, the scene of the previous frame image does not need to be re-recognized. However, in practical applications, by further determining the difference T1-T2 between the acquisition time T1 of the previous frame image and the execution time T2 of the last executed scene recognition step S103 closest to the current frame image, if T1-T2 is greater than the second time threshold, it is considered that although the current frame image and the scene of the previous frame image are theoretically considered to be substantially the same, since the time interval between the acquisition time of the current frame image and the execution time of the last executed scene recognition step S103 closest to the acquisition time of the current frame image is too long, in order to further ensure the practical effect, scene recognition and updating are forced to be performed on the current frame image, so as to further improve the accuracy of the practical result.
In practical application, if there are more pixel points in the image of the frame to be identified, the feature values of each pixel point in the picture are compared one by one, and the corresponding calculation amount is increased, so that the feature values of a plurality of pixel points in the image of each frame can be selected for comparison, and the calculation amount is reduced, and the corresponding power consumption is further reduced.
In a possible embodiment, the obtaining step S101 further includes extracting feature values of the current frame image and the previous frame image by sampling, and using the obtained corresponding feature values as the feature values of the current frame image and the previous frame image. By the method, the calculation amount in the characteristic value judgment process is reduced, and the corresponding power consumption is reduced.
For example, a frame image to be identified may be divided into N equal parts, and then the feature value of the central pixel point in each equal part may be selected as the feature value of the equal part. Accordingly, the frame image to be identified obtains N feature values. In practical application, the average value of the similarity of the feature values of the N feature values of the current frame image and the previous frame image may be used as the similarity of the feature values of the current frame image and the previous frame image. That is, if the feature value similarity is set as the feature value difference, the average value of the feature value differences of the N feature values of the current frame image and the previous frame image may be used as the feature value difference between the current frame image and the previous frame image.
In one possible embodiment, the characteristic value includes a luminance value of the frame image to be recognized or an RGB value of the frame image to be recognized. The RGB value may be a weighted average of pixel values of the R channel, a G channel, a B channel, or R, G, B channels.
As shown in fig. 2, in one possible embodiment, the scene recognition method 100 further comprises an image acquisition step S104 before the acquisition step S101.
In the step S104, a frame image to be identified may be acquired in real time by an image acquisition device; in the acquiring step, the feature value of the frame image to be recognized may be acquired based on the frame image to be recognized.
In practical applications, the image capturing device may be a front-end capturing device independent of the recognition device corresponding to the scene recognition method provided by the present disclosure, by transferring the captured image to the recognition device corresponding to the scene recognition method provided by the present disclosure; or may be an image acquisition module which is present inside the recognition device corresponding to the scene recognition method provided by the present disclosure and constitutes the recognition device.
As shown in fig. 3, in one possible embodiment, the scene recognition method 100 further includes a generate parameters step S105.
In the parameter generation step S105, shooting parameters for image shooting by the image capturing apparatus may be generated based on the scene recognition result acquired in the scene recognition step S103. For example, if the scene is a dark scene as a result of the scene recognition, the present disclosure may generate an image shooting parameter of a large aperture according to a characteristic of the dark scene, and transmit the image shooting parameter to the image capturing device.
Based on the same inventive concept, the embodiment of the present disclosure further provides a scene recognition apparatus 200. Referring to fig. 4, the scene recognition apparatus 200 includes an obtaining module 201, configured to obtain a feature value of a frame image to be recognized, where the frame image to be recognized includes a current frame image and a previous frame image, and the previous frame image is an nth frame image before the current frame image; the judging module 202 is configured to compare the feature value similarity with a threshold, where the feature value similarity is a similarity between a feature value of a current frame image and a feature value of a previous frame image; the scene recognition module 203: and the scene recognition module is used for recognizing the scene based on the data of the current frame image according to the comparison result of the similarity of the characteristic values and the threshold value.
In one example, the determining module 202 is configured to determine whether to perform the scene recognition step according to the comparison between the similarity of the feature values and a threshold. If the similarity of the characteristic values is greater than the threshold value, executing a scene identification step; and if the similarity of the characteristic values is less than or equal to the threshold value, the scene identification step is not executed.
In one example, the previous frame image may also be a first frame image before the current frame image, that is, an image of a frame previous to the current frame image.
In one example, the obtaining module 201 is further configured to obtain a collecting time of the current frame image, and obtain a time interval between the collecting time of the current frame image and an executing time of the scene recognition step executed last time according to the collecting time of the current frame image and the executing time of the scene recognition step executed last time; the judging module 202 is configured to judge whether to execute the scene recognition step according to the comparison feature value similarity and the threshold, and the comparison time interval and the interval threshold; the scene recognition module 203 is further configured to acquire and store an execution time for executing the scene recognition step.
In one example, the time interval threshold comprises a first interval threshold; the obtaining module 201 is further configured to obtain a collecting time of the current frame image; the determining module 202 is configured to determine whether to execute the scene recognition step according to the comparison feature value similarity and the threshold. If the similarity of the characteristic values is greater than the threshold value, judging the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step executed last time, and if the time interval is greater than or equal to a first interval threshold value, executing the scene recognition step; if the time interval is smaller than the first interval threshold, the scene recognition step is not executed; the scene recognition module 203 is further configured to acquire and store an execution time for executing the scene recognition step.
In one example, the time interval threshold comprises a second interval threshold; the obtaining module 201 is further configured to obtain a collecting time of the current frame image; the determining module 202 is configured to determine whether to execute the scene recognition step according to the comparison feature value similarity and the threshold. If the similarity of the characteristic values is smaller than or equal to the threshold, judging the time interval between the acquisition time of the current frame image and the execution time of the scene recognition step executed last time, and if the time interval is larger than a second interval threshold, executing the scene recognition step; if the time interval is less than or equal to the second interval threshold, the scene recognition step is not executed; the scene recognition module 203 is further configured to acquire and store an execution time for executing the scene recognition step.
In an example, the obtaining module 201 is further configured to perform feature value extraction on the current frame image and the previous frame image in a sampling manner, and use the obtained feature values as feature values of the current frame image and the previous frame image.
In one example, the feature value includes a luminance value of the frame image to be recognized or an RGB value of the frame image to be recognized.
In one example, before the obtaining module 201, the acquiring and identifying device 200 further includes an image obtaining module 204, configured to obtain, in real time, a frame image to be identified through an image acquiring device; the obtaining module 201 is configured to obtain a feature value of the frame image to be identified based on the frame image to be identified.
In one example, the capturing and identifying device 200 further includes a parameter generating module 205, configured to generate shooting parameters for the image capturing device to capture an image based on the scene identification result obtained in the scene identifying step.
Fig. 5 illustrates an electronic device 30 provided by an embodiment of the present disclosure. As shown in fig. 5, an embodiment of the present disclosure provides an electronic device 30, where the electronic device 30 includes a memory 310, a processor 320, and an Input/Output (I/O) interface 330. The memory 310 is used for storing instructions. And a processor 320 for calling the instructions stored in the memory 310 to execute the scene recognition method of the present disclosure. The processor 320 is connected to the memory 310 and the I/O interface 330, respectively, for example, via a bus system and/or other connection mechanism (not shown). The memory 310 may be used to store programs and data, including programs related to scene recognition in the embodiments of the present disclosure, and the processor 320 executes various functional applications and data processing of the electronic device 30 by executing the programs stored in the memory 310.
In the embodiment of the present disclosure, the processor 320 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), and the processor 320 may be one or a combination of several Central Processing Units (CPUs) or other forms of Processing units with data Processing capability and/or instruction execution capability.
Memory 310 in embodiments of the present disclosure may comprise one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile Memory may include, for example, a Random Access Memory (RAM), a cache Memory (cache), and/or the like. The nonvolatile Memory may include, for example, a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk Drive (HDD), a Solid-State Drive (SSD), or the like.
In the disclosed embodiment, the I/O interface 330 may be used to receive input instructions (e.g., numeric or character information, and generate key signal inputs related to user settings and function control of the electronic device 30, etc.), and may also output various information (e.g., images or sounds, etc.) to the outside. The I/O interface 330 in embodiments of the present disclosure may include one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, a touch panel, and the like.
In some embodiments, the present disclosure provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, perform any of the methods described above.
Although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
The methods and apparatus of the present disclosure can be accomplished with standard programming techniques with rule-based logic or other logic to accomplish the various method steps. It should also be noted that the words "means" and "module," as used herein and in the claims, is intended to encompass implementations using one or more lines of software code, and/or hardware implementations, and/or equipment for receiving inputs.
Any of the steps, operations, or procedures described herein may be performed or implemented using one or more hardware or software modules, alone or in combination with other devices. In one embodiment, the software modules are implemented using a computer program product comprising a computer readable medium containing computer program code, which is executable by a computer processor for performing any or all of the described steps, operations, or procedures.
The foregoing description of the implementations of the disclosure has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosure to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the disclosure. The embodiments were chosen and described in order to explain the principles of the disclosure and its practical application to enable one skilled in the art to utilize the disclosure in various embodiments and with various modifications as are suited to the particular use contemplated.

Claims (11)

1. A method of scene recognition, wherein the method comprises:
the method comprises the steps of obtaining a characteristic value of a frame image to be identified, wherein the frame image to be identified comprises a current frame image and a previous frame image, and the previous frame image is an Nth frame image before the current frame image;
a judging step of judging whether to execute a scene recognition step or not according to the comparison feature value similarity and a threshold value, wherein the feature value similarity is the similarity between the feature value of the current frame image and the feature value of the previous frame image;
the scene identification step comprises the steps of carrying out scene identification based on the current frame image;
the step of obtaining further comprises: acquiring the acquisition time of the current frame image, and obtaining the time interval between the acquisition time of the current frame image and the execution time of the last execution scene recognition step according to the acquisition time of the current frame image and the execution time of the last execution scene recognition step;
the judging step comprises the following steps: judging whether to execute the scene identification step according to the comparison of the similarity of the characteristic values and the threshold value and the comparison of the time interval and the interval threshold value;
the scene recognition step further comprises: and acquiring and storing the execution time of executing the scene recognition step.
2. The method of claim 1, wherein the determining step comprises:
according to the comparison between the similarity of the characteristic values and the threshold value, if the similarity of the characteristic values is larger than the threshold value, executing a scene identification step; and if the similarity of the characteristic values is less than or equal to the threshold value, not executing the scene identification step.
3. The method of claim 1, wherein,
the previous frame image is a first frame image before the current frame image.
4. The method of claim 1, wherein,
the interval threshold comprises a first interval threshold;
the judging step comprises the following steps: according to the comparison between the similarity of the characteristic value and the threshold value, if the similarity of the characteristic value is larger than the threshold value, the time interval between the acquisition time of the current frame image and the execution time of the last scene recognition step is judged,
if the time interval is greater than or equal to a first interval threshold, executing a scene identification step;
and if the time interval is smaller than the first interval threshold, not executing the scene identification step.
5. The method of claim 1 or 4,
the interval threshold comprises a second interval threshold;
the judging step comprises the following steps: according to the comparison between the similarity of the characteristic value and the threshold value, if the similarity of the characteristic value is less than or equal to the threshold value, the time interval between the acquisition time of the current frame image and the execution time of the last scene recognition step is judged,
if the time interval is greater than a second interval threshold, executing a scene identification step;
and if the time interval is less than or equal to the second interval threshold, not executing the scene identification step.
6. The method of claim 1, wherein the obtaining step further comprises:
and extracting characteristic values of the current frame image and the previous frame image in a sampling mode, and taking the obtained characteristic values as the characteristic values of the current frame image and the previous frame image.
7. The method of claim 1, wherein,
the characteristic value comprises a brightness value of the frame image to be identified or an RGB value of the frame image to be identified.
8. The method of claim 1, wherein the method further comprises:
and a parameter generation step of generating shooting parameters for the image acquisition device to shoot images based on the scene recognition result obtained in the scene recognition step.
9. A scene recognition apparatus, wherein the apparatus comprises:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a characteristic value of a frame image to be identified, the frame image to be identified comprises a current frame image and a previous frame image, and the previous frame image is an Nth frame image before the current frame image;
the judging module is used for comparing the similarity of the characteristic values with a threshold value, wherein the similarity of the characteristic values is the similarity between the characteristic value of the current frame image and the characteristic value of the previous frame image;
a scene recognition module: the scene recognition module is used for recognizing scenes based on the data of the current frame image according to the comparison result of the similarity of the characteristic values and the threshold value;
the acquisition module is further configured to: acquiring the acquisition time of the current frame image, and obtaining the time interval between the acquisition time of the current frame image and the execution time of the last execution scene recognition step according to the acquisition time of the current frame image and the execution time of the last execution scene recognition step;
the judging module is further configured to: judging whether to execute the scene identification step according to the comparison of the similarity of the characteristic values and the threshold value and the comparison of the time interval and the interval threshold value;
the scene recognition module is further configured to: and acquiring and storing the execution time of executing the scene recognition step.
10. An electronic device, wherein the electronic device comprises:
a memory to store instructions; and
a processor for invoking the memory-stored instructions to perform the scene recognition method of any of claims 1-8.
11. A computer-readable storage medium, wherein,
the computer-readable storage medium stores computer-executable instructions that, when executed by a processor, perform the scene recognition method of any one of claims 1-8.
CN201910596008.1A 2019-07-03 2019-07-03 Scene recognition method and device Active CN110336943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910596008.1A CN110336943B (en) 2019-07-03 2019-07-03 Scene recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910596008.1A CN110336943B (en) 2019-07-03 2019-07-03 Scene recognition method and device

Publications (2)

Publication Number Publication Date
CN110336943A CN110336943A (en) 2019-10-15
CN110336943B true CN110336943B (en) 2021-05-25

Family

ID=68144783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910596008.1A Active CN110336943B (en) 2019-07-03 2019-07-03 Scene recognition method and device

Country Status (1)

Country Link
CN (1) CN110336943B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114038197B (en) * 2021-11-24 2023-06-13 浙江大华技术股份有限公司 Scene state determining method and device, storage medium and electronic device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100002070A1 (en) * 2004-04-30 2010-01-07 Grandeye Ltd. Method and System of Simultaneously Displaying Multiple Views for Video Surveillance
KR100652703B1 (en) * 2004-12-08 2006-12-01 엘지전자 주식회사 Methods and a apparatus of searching video for mobile phone
CN103763458B (en) * 2014-01-20 2017-06-27 华为技术有限公司 A kind of scene-change detecting method and device
US9536161B1 (en) * 2014-06-17 2017-01-03 Amazon Technologies, Inc. Visual and audio recognition for scene change events
CN105812647B (en) * 2014-12-30 2019-05-31 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105262954B (en) * 2015-11-17 2019-07-19 腾讯科技(深圳)有限公司 The method and apparatus that triggering camera focuses automatically
CN108804980B (en) * 2017-04-28 2022-01-04 阿里巴巴(中国)有限公司 Video scene switching detection method and device
CN109327655B (en) * 2017-07-31 2020-12-22 展讯通信(上海)有限公司 Continuous automatic focusing method and system
CN109426832A (en) * 2017-08-30 2019-03-05 湖南拓视觉信息技术有限公司 Closed loop detection method, storage medium and electronic equipment in scene three-dimensional modeling
CN107592468B (en) * 2017-10-23 2019-12-03 维沃移动通信有限公司 A kind of shooting parameter adjustment method and mobile terminal
CN107635101B (en) * 2017-10-27 2020-07-03 Oppo广东移动通信有限公司 Shooting method, shooting device, storage medium and electronic equipment
CN109063694B (en) * 2018-09-12 2021-07-02 北京科技大学 Video target detection and identification method

Also Published As

Publication number Publication date
CN110336943A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
KR102574141B1 (en) Image display method and device
JP7266672B2 (en) Image processing method, image processing apparatus, and device
US9330446B2 (en) Method and apparatus for processing image
KR101303877B1 (en) Method and apparatus for serving prefer color conversion of skin color applying face detection and skin area detection
WO2019137131A1 (en) Image processing method, apparatus, storage medium, and electronic device
US8452091B2 (en) Method and apparatus for converting skin color of image
CN110796600B (en) Image super-resolution reconstruction method, image super-resolution reconstruction device and electronic equipment
JP2021531554A (en) Image processing methods and devices, electronic devices and storage media
JP2012059076A (en) Information processor, its recognition method and program
CN109598250B (en) Feature extraction method, device, electronic equipment and computer readable medium
CN110213479B (en) Anti-shake method and device for video shooting
CN111967319B (en) Living body detection method, device, equipment and storage medium based on infrared and visible light
CN112927144A (en) Image enhancement method, image enhancement device, medium, and electronic apparatus
CN110751593A (en) Image blurring processing method and device
CN110365905B (en) Automatic photographing method and device
CN110336943B (en) Scene recognition method and device
WO2019179242A1 (en) Image processing method and electronic device
CN108259767B (en) Image processing method, image processing device, storage medium and electronic equipment
CN109977738B (en) Video scene segmentation judging method, intelligent terminal and storage medium
CN111967529B (en) Identification method, device, equipment and system
CN111814745A (en) Gesture recognition method and device, electronic equipment and storage medium
US8908974B2 (en) Image capturing device capable of simplifying characteristic value sets of captured images and control method thereof
CN105163040A (en) Image processing method and mobile terminal
CN110956576B (en) Image processing method, device, equipment and storage medium
US11216922B2 (en) Systems and methods for recognition of user-provided images

Legal Events

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