Event matching method, device, storage medium and electronic device
By obtaining the parameter information of the flash image, matching the associated target events, UD technology is used to solve the problem of difficulty in matching target events with pictures, and improving the accuracy of feature detection in the window.
Patent Information
- Application Number
- CN202110192726.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-20
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-02-20
AI Technical Summary
In the prior art, it is difficult to accurately match the target events with the captured pictures, resulting in poor feature detection effect in the window in a low-brightness environment, especially the poor fill light effect in the window, which affects the detection of features in the window.
By obtaining the pictures taken with the flash, determining their corresponding parameter information (such as collection time identification), matching and association of the corresponding target event from the target event set, and using UniqueData (UD) technology to generate unique parameter information to achieve accurate matching .
The accuracy of linked flash shooting is improved, the precise matching relationship between the target event and the captured picture is achieved, and the effect of feature detection in the car window is improved.
Smart Images

Figure CN112906791B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to an event matching method, device, storage medium and electronic device. Background Art
[0002] In the current related technologies, the collection and recognition of image information is applied in a variety of application scenarios, such as traffic travel, security monitoring, etc. Taking traffic violation evidence collection as an example, based on the rigor of traffic violation evidence collection, it is necessary to capture a set of clear motor vehicle violation feature pictures. When the ambient brightness is low, the traffic camera is required to be used with a flash. When the intelligent detection algorithm in the camera detects various violations, a violation event is generated, and the flash is triggered to flash to capture the picture.
[0003] The commonly used method is the sequential association matching method, which can be summarized as follows: when the trigger signal is generated, the violation event will wait for the arrival of the flash frame within the timeout threshold; when the flash frame arrives, the event will be associated with the flash frame.
[0004] Taking the matching of m groups of traffic violation events and n flash frames generated by a single car out of order as an example, there will be a situation where a traffic violation event is associated with a flash frame triggered by b between the m groups of traffic violation events and n flash frames generated by a single car out of order. After the flash fill light, the picture often needs to further detect the features inside the car window, such as the driver wearing a seat belt, making a phone call, smoking, etc. Due to the error in matching the event and the flash frame, the fill light effect of the desired captured vehicle will be poor, especially the fill light effect inside the car window, which affects the detection of the features inside the car window.
[0005] With regard to the technical problem in related technologies that it is difficult to accurately match target events with captured images, no effective solution has been proposed so far. Summary of the invention
[0006] The embodiments of the present invention provide an event matching method, device, storage medium and electronic device to at least solve the technical problem in the related art that it is difficult to accurately match the target event with the captured image.
[0007] According to one embodiment of the present invention, there is provided a method for matching events, comprising: acquiring a first picture taken using a flash; determining first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a capture time identifier of the first picture; determining a target event that matches the first parameter information from a target event set, and associating the first picture and the target event.
[0008] According to another embodiment of the present invention, there is provided an event matching device, comprising: an acquisition module, used to acquire a first picture taken using a flash; a determination module, used to determine first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a capture time identifier of the first picture; and a processing module, used to determine a target event matching the first parameter information from a target event set, and to associate the first picture with the target event.
[0009] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps in any of the above method embodiments when executed by a processor.
[0010] According to another embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in any one of the above method embodiments when executing the computer program.
[0011] Through the present invention, a first picture taken when using a flash is obtained; first parameter information corresponding to the first picture is determined, wherein the first parameter information is used to indicate a capture time identifier of the first picture; a target event matching the first parameter information is determined from a target event set, and the first picture and the target event are associated, and accurate matching and association between the target event and the first picture is achieved based on the first parameter information. Therefore, the technical problem in the related art that it is difficult to accurately match and associate the target event with the captured picture can be solved, thereby achieving the technical effect of improving the accuracy of linked flash shooting and achieving accurate matching and association between the target event and the captured picture. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0013] Figure 1 is a hardware structure block diagram of a mobile terminal according to an optional event matching method of an embodiment of the present invention;
[0014] Figure 2 is a flow chart of an optional event matching method according to an embodiment of the present invention;
[0015] Figure 3 is a schematic diagram of an optional event matching method according to an embodiment of the present invention;
[0016] Figure 4is a schematic diagram of another optional event matching method according to an embodiment of the present invention;
[0017] Figure 5 is a schematic diagram of another optional event matching method according to an embodiment of the present invention;
[0018] Figure 6 is a schematic diagram of another optional event matching method according to an embodiment of the present invention;
[0019] Figure 7 is a schematic diagram of another optional event matching method according to an embodiment of the present invention;
[0020] Figure 8 is a schematic diagram of another optional event matching method according to an embodiment of the present invention;
[0021] Fig. 9 It is a structural block diagram of an optional event matching device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0024] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of an event matching method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the event matching method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a method for matching events running on a mobile terminal, a computer terminal or a similar computing device is provided. Figure 2 is a flow chart of an optional event matching method according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0028] S202, obtaining a first picture taken using a flash;
[0029] S204, determining first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture;
[0030] S206: Determine a target event that matches the first parameter information from the target event set, and associate the first picture with the target event.
[0031] Optionally, in this embodiment, the flashlight may include one or more. In other words, the number of the first picture may include but is not limited to one or more. Taking the flashlight used to monitor traffic as an example, it may include but is not limited to being configured to be associated with a camera used to capture traffic violations. Specifically, it may include but is not limited to configuring a corresponding camera and flashlight for each lane. It may also include but is not limited to configuring corresponding cameras and flashlights at different positions on the same lane.
[0032] Optionally, in this embodiment, the first parameter information is used to indicate the acquisition time identifier of the first picture and may include but is not limited to an acquisition time identifier generated by the acquisition sequence of the first picture within a predetermined time period.
[0033] For example, based on the UniqueData (UD for short) technology, a unique UD value is generated within a certain time range as the above-mentioned acquisition time identifier, so as to accurately match the violation event and the flashing frame, effectively solving the above-mentioned matching error or failure problem.
[0034] Optionally, in this embodiment, the above-mentioned target event set may include but is not limited to being generated by a decision model. For example, taking the field of transportation as an example, a violation event is generated by a violation decision module, and the violation event is added to the corresponding target event set cache.
[0035] Figure 3 is a schematic diagram of an optional event matching method according to an embodiment of the present invention, such as Figure 3 As shown, the process includes but is not limited to the following steps:
[0036] S302, Start;
[0037] S304, determining whether the received picture is a flash frame (corresponding to the first picture mentioned above), if the determination result is yes, executing step S306, otherwise, executing step S316;
[0038] S306, obtaining UD information (corresponding to the aforementioned first parameter information) from the accompanying frame information;
[0039] S308, determining whether there is an event to be associated in the target event set, if the determination result is yes, executing step S310, otherwise, executing step S316;
[0040] S310, determining whether the event UD value is equal to the UD value of the accompanying frame, if the determination result is yes, executing step S312-1, otherwise, executing step S312-2;
[0041] S312-1, if the match is successful, an event frame is generated, and step S314 is executed;
[0042] S312-2, determine whether the event has timed out. If the determination result is yes, execute step S314; otherwise, execute step S308;
[0043] S314, deleting the event to be associated from the list;
[0044] S316, End.
[0045] The above is only an example, and this embodiment does not make any specific limitation.
[0046] Through this embodiment, a first picture taken when using a flash is obtained; first parameter information corresponding to the first picture is determined, wherein the first parameter information is used to indicate a capture time identifier of the first picture; a target event matching the first parameter information is determined from a target event set, and the first picture and the target event are associated, and accurate matching and association between the target event and the first picture is achieved based on the first parameter information. Therefore, the technical problem in related technologies that it is difficult to accurately match and associate the target event with the captured picture can be solved, thereby achieving the technical effect of improving the accuracy of linked flash shooting and achieving accurate matching and association between the target event and the captured picture.
[0047] As an optional solution, before obtaining the first picture collected by using a flash, the method also includes: determining multiple parameter information generated in advance based on predetermined rules, wherein the values of the parameter information are unique within a predetermined time range; when the target event is detected, determining the first parameter information from the multiple parameter information; and triggering the flash to flash based on the first parameter information to take the first picture.
[0048] Optionally, in this embodiment, the above-mentioned predetermined rules may include but are not limited to digital identifiers generated in chronological order, and may include but are not limited to a pre-configured parameter information generation module to ensure that parameter information generated within a certain time range is unique.
[0049] Optionally, in this embodiment, when the target event is detected, the following steps may be included but not limited to:
[0050] S1, obtaining a trigger signal for triggering generation of a target event according to an image detection result of an image acquisition device;
[0051] S2, in response to a trigger signal, obtaining target parameter information;
[0052] S3, using the target parameter information to mark the target event, and adding the target event to the target event set.
[0053] The above-mentioned trigger signal may include but is not limited to being determined by an event decision module, generating a target event when detecting that the conditions for triggering a target event are met, and generating the above-mentioned trigger signal to obtain target parameter information and bind the target parameter information to the target event.
[0054] The target parameter information is one parameter information among multiple parameter information, and may be but is not limited to the first parameter information.
[0055] Optionally, in the present embodiment, triggering a flash to flash based on the first parameter information to capture a first picture may include but is not limited to triggering multiple flashes to flash based on the first parameter information to capture multiple first pictures.
[0056] The above is only an example, and this embodiment does not make any specific limitation.
[0057] Through this embodiment, a plurality of parameter information generated in advance based on predetermined rules is determined, wherein the value of the parameter information is unique within a predetermined time range, and when the occurrence of a target event is detected, first parameter information is determined from the plurality of parameter information, and a flash is triggered to flash based on the first parameter information to take a first picture. The acquisition and shooting order of each first picture can be accurately determined, and further, the technical effect of more accurately associating and matching the target event with the first picture can be achieved.
[0058] As an optional scheme, after determining the first parameter information from the multiple parameter information, the method also includes: using the first parameter information to mark the target event; determining the target event that matches the first parameter information from the target event set includes: determining the event marked with the first parameter information based on the parameter information marked on each event included in the target event set, and determining the determined event as the target event that matches the first parameter information.
[0059] Optionally, in this embodiment, the use of the first parameter information to mark the target event may include but is not limited to sending the target event to a module that has pre-cached the first parameter information to obtain the first parameter information, and then, using the first parameter information to mark the target event.
[0060] Optionally, in this embodiment, based on the parameter information marked on each event included in the target event set, the event marked with the first parameter information is determined, and the determined event is determined as the target event matching the first parameter information, which may include but is not limited to determining the parameter information marked on each event in the target event set, and then determining the event marked with the above-mentioned first parameter information through screening and comparison. It may also include but is not limited to pre-sorting the above-mentioned target event set according to the shooting order represented by the parameter information to speed up the efficiency of determining the target event from the target event set.
[0061] Figure 4 is a schematic diagram of another optional event matching method according to an embodiment of the present invention, taking the target event as a traffic violation event and the parameter information as a UD value as an example, Figure 4 As shown, the process includes but is not limited to the following steps:
[0062] S402, Start;
[0063] S404, violation analysis;
[0064] S406, judging whether it constitutes a violation, if the judgment result is yes, executing step S408, otherwise, executing step S412;
[0065] S408, applying for a UD value from a UD value generating module;
[0066] S410, identifying the applied UD value to the traffic violation event, and registering the traffic violation event to the event list;
[0067] S412, End.
[0068] In other words, when the violation decision module determines that a violation has occurred and needs to be linked to trigger the flash light, it first applies for a UD value from the "UD value generation module"; identifies the UD value to the violation event and then registers the violation event to the event list; finally, outputs a trigger signal identified by the UD value to the flash light control module to link the flash light.
[0069] The above is only an example, and this embodiment does not make any specific limitation.
[0070] Through this embodiment, by adopting a method of determining an event marked with the first parameter information based on the parameter information marked on each event included in the target event set, and determining the determined event as a target event matching the first parameter information, it is possible to mark the target event according to the first parameter information, and then, determine the target event from the target event set through the first parameter information, and achieve a technical effect of more accurately associating and matching the target event with the first picture.
[0071] As an optional scheme, triggering the flash to flash based on the first parameter information to take the first picture includes: generating a first trigger signal based on the first parameter information; triggering the flash to flash based on the first trigger signal to take an initial picture; binding the first parameter information with the initial picture to obtain the first picture, and caching the first picture in a preset storage space according to the order of picture acquisition.
[0072] Optionally, in this embodiment, the first trigger signal may include but is not limited to being generated by a module that generates a target event. After the target event is generated, the first trigger signal is immediately sent to a flash control module to trigger the flash to flash.
[0073] Optionally, in this embodiment, the initial picture is a picture taken with a flash but not yet bound to the first parameter information, and the first picture is a picture taken with a flash and bound to the first parameter information.
[0074] Optionally, in this embodiment, the preset storage space may include but is not limited to a preconfigured preset storage space for caching the first image, and may include but is not limited to a database or a hard disk associated with the matching module.
[0075] Through this embodiment, a first trigger signal is generated based on the first parameter information; the flash is triggered to flash based on the first trigger signal to take an initial picture; the first parameter information is bound to the initial picture to obtain the first picture, and the first picture is cached in a preset storage space in the order of picture acquisition. This can achieve the binding of the first parameter information to the initial picture for the target event to obtain the first picture, and further, the target event matching the first picture can be determined from the target event set through the first parameter information, so as to achieve the technical effect of more accurately associating and matching the target event with the first picture.
[0076] As an optional scheme, triggering the flash to flash based on the first trigger signal to take an initial picture includes: determining the shooting parameters indicated by the first trigger signal, wherein the shooting parameters include the number of shots and the shooting interval; triggering the flash to flash according to the number of shots and the shooting interval to take the initial picture.
[0077] Optionally, in this embodiment, the above-mentioned shooting parameters may include but are not limited to the number of shots and the shooting interval, and may also include but are not limited to indicating the resolution of the initial picture taken, the flash mark required for shooting, etc. The above-mentioned number of shots is used to indicate the number of first pictures required to be taken after the target event is generated, or the number of times the flash is required to be used. The above-mentioned shooting interval is used to indicate the interval between different shooting opportunities when the number of shots is multiple. Specifically, it may include but is not limited to configuring multiple shots to be shot evenly at fixed time intervals, and may also include but is not limited to configuring corresponding shooting intervals for each shot.
[0078] For example, the flash light F1 is triggered twice with a frame interval of 2 as indicated by the first trigger signal, and then two first pictures taken by the flash light F1 in a flashing state with a shooting interval of 2 are acquired.
[0079] The above is only an example, and this embodiment does not make any specific limitation.
[0080] Through this embodiment, the shooting parameters indicated by the first trigger signal are determined, wherein the shooting parameters include the number of shots and the shooting interval; the flash is triggered to flash according to the number of shots and the shooting interval, so as to take the initial picture. The number of shots, the shooting interval, the flash used for shooting, etc. can be indicated according to the first trigger signal, thereby achieving the technical effect of taking an initial picture that meets expectations more effectively, so as to more accurately associate and match the target event with the first picture.
[0081] As an optional scheme, triggering the flash to flash according to the number of shots and the shooting interval to take the initial picture includes: when it is determined that the number of shots is multiple times, and when it is determined based on the shooting interval that there is a target initial picture to be taken within the recycle time period of the flash, adjusting the shooting interval to take the target initial picture within the next fill light time period of the recycle time period; triggering the flash to flash according to the adjusted shooting interval and the number of shots to take the initial picture, wherein the initial picture includes the target initial picture.
[0082] Figure 5 is a schematic diagram of another optional event matching method according to an embodiment of the present invention, taking the target event as a traffic violation event and the parameter information as a UD value as an example, Figure 5 As shown, the process includes but is not limited to the following:
[0083] Respectively in T n-1 , T n , T n+2There is a flash F1 snapshot action at each time, and each time is identified by a unique UD value. The first UD:1 trigger signal is at T n When the moment takes effect, the neighborhood time T delta The timing starts, and the second trigger UD:2 that occurs within the timing range is postponed to T n+3 It will be officially effective at the moment, and will be merged into the same group with the third trigger UD:3, flashing to the same frame YUV:T n+2 Each captured flash frame is identified by the corresponding UD value and flash serial number, which is used to indicate which triggers the flash frame corresponds to and which flashes are used to flash. The UD value and flash identification on YUV can be merged into the frame information for subsequent business matching and association.
[0084] Among them, the above Figure 5 The neighborhood time T shown in delta This is the call back time period mentioned above.
[0085] The above is only an example, and this embodiment does not make any specific limitation.
[0086] As an optional solution, the method further includes:
[0087] Acquire a first event indicating a first time of using the flash to capture a picture and a second event indicating a second time of using the flash to capture a picture, wherein the target event set includes the first event and the second event;
[0088] Acquire the recycling time period of the flashlight to obtain a neighborhood time of the first time, wherein the neighborhood time is the sum of the first time and the recycling time period;
[0089] When the second time is within the first neighborhood time, the second time indicated by the second event for using the flash to capture a picture is postponed to the next fill light time period after the recycle time period to take a second picture, wherein the second picture is a picture with the same parameter information as the second event.
[0090] Optionally, in this embodiment, the first event and the second event are both events in the target event set, the neighborhood time of the first time is the sum of the time point of the first time and the recharge time period of the flash, and the next fill light time period after the recharge time period may include but is not limited to the time period that can be used for flash shooting after the flash recharge is completed.
[0091] Optionally, in this embodiment, taking the field of intelligent transportation as an example, it is required that the traffic camera can clearly capture a set of illegal process pictures when collecting evidence. When collecting evidence, according to the capture strategy of the specific violation, multiple pictures will be continuously captured at different times or locations to generate a set of violation records. When the ambient brightness is relatively low, in order to obtain clear evidence pictures, a fill light device will be required to perform linkage fill light when the camera decides to capture.
[0092] The characteristics of the flash being triggered in linkage: within a unit time, the probability density of the flash being triggered in linkage is often random and positively correlated with the density of traffic flow. This is mainly due to the fact that each group of snapshot decisions of the camera is independent of each other. Therefore, the solution proposed in this embodiment mainly proposes a feasible solution strategy for the problem of black film and dark frame caused by matching (hereinafter collectively referred to as "dark frame").
[0093] Optionally, in this embodiment, the recycling time period of the flashlight is determined by the recycling time of the flashlight. The recycling time of different flashlights is calculated separately and may be the same or different. Specifically, it may be determined according to the parameters of the flashlight.
[0094] Optionally, in this embodiment, it is necessary to obtain the minimum response time of the flash and configure it to the flash control module of the camera. The neighborhood time is calculated from the last time the flash was triggered; and the recharge time of a flash is counted backward; the trigger signals for the same flash within the neighborhood time range are combined and postponed to the end of the neighborhood time.
[0095] Optionally, in this embodiment, the flash control module in the camera combines the snapshot trigger signals for the same flash within the neighborhood time into one, triggering the flash only once and generating one snapshot. The size of the neighborhood time is determined according to the flash recycle time, ensuring that each time the flash is triggered, the flash has been fully recycled and is ready, avoiding the problem of black film or insufficient flash.
[0096] The present embodiment is further explained below with reference to specific examples:
[0097] As the requirements for capturing positions and extracting features of people in car windows in the field of traffic security are getting higher and higher, accurate capturing and image brightening are required during video capturing to facilitate feature extraction in car windows. This proposal provides an accurate matching association method based on UD technology to ensure the accuracy of the linked light calculation light capture.
[0098] Figure 6 is a schematic diagram of another optional event matching method according to an embodiment of the present invention, such as Figure 6As shown, it specifically includes but is not limited to the following modules: a violation decision module 602, a flash control module 604, a collection module 606, a matching module 608, etc.
[0099] This also includes but is not limited to a "UD value generation module", and the UD value generated by this module within a certain time range is unique.
[0100] Traffic violation decision module 602, when the traffic violation decision module determines that a traffic violation has occurred and needs to be linked to trigger the flash light, first apply for a UD value from the "UD value generation module"; mark the UD value on the traffic violation event and then register the traffic violation event to the event list; finally, output the trigger signal marked by the UD value to the flash light control module to link the flash light.
[0101] The flash control module 604, while controlling the capture and linkage of the flash, will cache the UD value of the corresponding timing point (if the timing point corresponds to multiple triggers, multiple UD values will be merged into a group) UD information in chronological order, and after the flash frame is generated, the acquisition module will take away the corresponding UD information.
[0102] The acquisition module 606, when acquiring the flash frame, takes the corresponding UD information from the flash control module, binds it to the frame, and transfers it to the subsequent links in the form of frame information. It is required that the acquisition module and the flash control module are the closest in timing to ensure the order matching relationship, so that the acquisition module will not take the wrong corresponding UD information when receiving the flash frame. Trigger first, generate image data, and take away the UD value.
[0103] When receiving the flash frame, the matching module 608 obtains the mapped UD information from the accompanying frame information and finds the events with matching UD values from the event list; after matching these events to the flash frame, they are converted into event frame output for subsequent business processing such as further identification of features in the vehicle window and encoding.
[0104] Figure 7 is a schematic diagram of another optional event matching method according to an embodiment of the present invention, such as Figure 7 As shown, the trigger matching process based on UD technology is demonstrated. Figure 7 There are two triggers in total. The first one is triggered by the video frame YUV:T n-3 Frame trigger, the trigger signal identifier UD value is 1, requiring the flash light F1 to be triggered twice with a frame interval of 2, and a total of two flash frames are captured; the flash frame generated corresponding to the first trigger is YUV:T n-1 and YUV:T n+2 The second time is the video frame YUV:T n-2Frame trigger, the trigger signal identifier UD value is 2, requiring the flash light F2 to be triggered twice with a frame interval of 1, and a total of two flash frames are captured; the flash frame generated corresponding to the second trigger is YUV:T n and YUV:T n+2 Because the second shot of the first trigger and the second shot of the second trigger are captured at the same time, they are merged into the same frame YUV:T by the flash control module. n+2 In the figure, the frame is composed of F1 and F2 flashing at the same time, and the UD information in the frame information is 1 and 2. According to the logic of UD technology association matching, the final matching result is: YUV:T n-1 , the UD information carried is 1, which matches the first triggered event 1; YUV: T n , the UD information carried is 2, which matches the event 1 triggered for the second time; YUV: T n+2 , the UD information carried is 1 and 2, which matches the event 2 triggered for the first time, and also matches the event 2 triggered for the second time, where trigger1 and trigger2 correspond to different trigger signals respectively.
[0105] The above shows that UD technology can correctly meet the requirements of precise matching, and can solve the matching problem between m groups of traffic violation events of a single vehicle out of sequence and n flashing frames; it can also solve the matching problem between m groups of traffic violation events generated by multiple vehicles out of sequence and n flashing frames.
[0106] It should be noted that, in actual applications, one flashlight is generally provided as standard for one lane. When monitoring multiple lanes, vehicles passing through multiple lanes simultaneously will trigger multiple flashlights. This embodiment is designed for flashlight neighborhood time merging in this case. Figure 8 is a schematic diagram of another optional event matching method according to an embodiment of the present invention, such as Figure 8 As shown, Figure 8 Describes the processing logic for this type of situation. n The second trigger at time T requires the linkage of flashlights F1 and F2. F1 is delayed until the end of the neighboring time due to the influence of the previous trigger, but F2 remains at T n+1 Finally, the second trigger is broken down into 2 separate triggers.
[0107] Through this embodiment, the precise matching method using uniqueData (UD for short) identification technology is used to solve the matching problem between the flash frame and the violation event in the case of linked flash capture. Specifically, it can completely solve the matching problem between the flash frame and the violation event in the case of video detection linked flash capture. Precise matching can make the capture position more stable and closer to the expectation at the time of triggering. Precise matching can make the image effect the best when the event frame is sent to the feature detection in the car window.
[0108] In addition, this embodiment is highly practicable and widely applicable, and is not limited to being implemented in a single camera. It can also be adapted to the situation where multiple cameras form a master-slave linkage snapshot, that is, when the master camera is linked to the slave camera, the linkage signal identifier UD value can be sent to the slave camera, and after the slave camera captures the picture, the image carrying the UD value is sent back to the master camera for matching.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0110] In the present embodiment, a matching device for an event is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] Fig. 9 is a structural block diagram of an optional event matching device according to an embodiment of the present invention, such as Fig. 9 As shown, the device comprises:
[0112] An acquisition module 902 is used to acquire a first picture taken using a flash;
[0113] A determination module 904 is configured to determine first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture;
[0114] The processing module 906 is used to determine a target event matching the first parameter information from the target event set, and associate the first picture with the target event.
[0115] As an optional solution, the device is also used to: before acquiring a first picture collected using a flash, determine multiple parameter information generated in advance based on predetermined rules, wherein the values of the parameter information are unique within a predetermined time range; when the target event is detected, determine the first parameter information from the multiple parameter information; and trigger the flash to flash based on the first parameter information to take the first picture.
[0116] As an optional scheme, the device is also used to: after determining the first parameter information from the multiple parameter information, use the first parameter information to mark the target event; determining the target event that matches the first parameter information from the target event set includes: determining the event marked with the first parameter information based on the parameter information marked on each event included in the target event set, and determining the determined event as the target event that matches the first parameter information.
[0117] As an optional scheme, the device is used to trigger the flash to flash based on the first parameter information to take the first picture in the following manner: generate a first trigger signal based on the first parameter information; trigger the flash to flash based on the first trigger signal to take an initial picture; bind the first parameter information with the initial picture to obtain the first picture, and cache the first picture in a preset storage space according to the order of picture acquisition.
[0118] As an optional scheme, the device is used to trigger the flash to flash based on the first trigger signal to take an initial picture in the following manner: determine the shooting parameters indicated by the first trigger signal, wherein the shooting parameters include the number of shots and the shooting interval; trigger the flash to flash according to the number of shots and the shooting interval to take the initial picture.
[0119] As an optional solution, the device is used to trigger the flash to flash according to the number of shots and the shooting interval to take the initial picture in the following manner: when it is determined that the number of shots is multiple times, and when it is determined based on the shooting interval that the target initial picture exists within the recycle time period of the flash, adjust the shooting interval to take the target initial picture within the next fill light time period of the recycle time period; trigger the flash to flash according to the adjusted shooting interval and the number of shots to take the initial picture, wherein the initial picture includes the target initial picture.
[0120] As an optional solution, the device is also used for:
[0121] Acquire a first event indicating a first time of using the flash to capture a picture and a second event indicating a second time of using the flash to capture a picture, wherein the target event set includes the first event and the second event;
[0122] Acquire the recycling time period of the flashlight to obtain a neighborhood time of the first time, wherein the neighborhood time is the sum of the first time and the recycling time period;
[0123] When the second time is within the first neighborhood time, the second time indicated by the second event for using the flash to capture a picture is postponed to the next fill light time period after the recycle time period to take a second picture, wherein the second picture is a picture with the same parameter information as the second event.
[0124] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0125] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0126] In this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0127] S1, obtaining a first picture taken using a flash;
[0128] S2, determining first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture;
[0129] S3: Determine a target event that matches the first parameter information from the target event set, and associate the first picture with the target event.
[0130] The computer readable storage medium is further configured to store a computer program for performing the following steps:
[0131] S1, obtaining a first picture taken using a flash;
[0132] S2, determining first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture;
[0133] S3: Determine a target event that matches the first parameter information from the target event set, and associate the first picture with the target event.
[0134] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0135] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0136] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0137] In an exemplary embodiment, the processor may be configured to perform the following steps via a computer program:
[0138] S1, obtaining a first picture taken using a flash;
[0139] S2, determining first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture;
[0140] S3: Determine a target event that matches the first parameter information from the target event set, and associate the first picture with the target event.
[0141] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0142] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for matching events, characterized in that: include: Acquire a first picture taken using a flash; Determine first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture; Determine a target event matching the first parameter information from a target event set, and associate the first picture with the target event; Before acquiring the first picture taken by using the flash, the method further includes: determining a plurality of parameter information generated in advance based on a predetermined rule, wherein the value of the parameter information is unique within a predetermined time range; determining the first parameter information from the plurality of parameter information when the target event is detected; triggering the flash to flash based on the first parameter information to take the first picture; The method also includes: obtaining a first time when the first event indicates that the flash is used to capture a picture and a second time when the second event indicates that the flash is used to capture a picture, wherein the target event set includes the first event and the second event; obtaining a recycle time period of the flash to obtain a neighborhood time of the first time, wherein the neighborhood time is the sum of the first time and the duration of the recycle time period; when the second time is within the neighborhood time of the first time, postponing the second time when the second event indicates that the flash is used to capture a picture to the next fill light time period after the recycle time period to capture a second picture, wherein the second picture is a picture having the same parameter information as the second event.
2. The method according to claim 1, characterized in that: After determining the first parameter information from the plurality of parameter information, the method further includes: using the first parameter information to mark the target event; Determining a target event matching the first parameter information from a target event set includes: determining an event marked with the first parameter information based on the parameter information marked on each event included in the target event set, and determining the determined event as a target event matching the first parameter information.
3. The method according to claim 2, characterized in that Triggering the flash to flash based on the first parameter information to take the first picture includes: generating a first trigger signal based on the first parameter information; Triggering the flash to flash based on the first trigger signal to take an initial picture; The first parameter information is bound to the initial image to obtain the first image, and the first image is cached in a preset storage space according to the order in which the images are collected.
4. The method according to claim 3, characterized in that Triggering the flash to flash based on the first trigger signal to take an initial picture includes: Determining shooting parameters indicated by the first trigger signal, wherein the shooting parameters include shooting times and shooting intervals; The flash is triggered to flash according to the number of shots and the shooting interval to take the initial picture.
5. The method according to claim 4, characterized in that Triggering the flash to flash according to the number of shots and the shooting interval to shoot the initial picture includes: When it is determined that the number of shots is multiple times, and when it is determined based on the shooting interval that the target initial picture is shot within the recycling time period of the flash, adjusting the shooting interval to shoot the target initial picture within the next fill light time period of the recycling time period; The flash is triggered to flash according to the adjusted shooting interval and the shooting number to shoot the initial picture, wherein the initial picture includes the target initial picture.
6. An event matching device, characterized in that: include: An acquisition module, used to acquire a first picture taken using a flash; A determination module, configured to determine first parameter information corresponding to the first picture, wherein the first parameter information is used to indicate a collection time identifier of the first picture; A processing module, configured to determine a target event matching the first parameter information from a target event set, and associate the first picture with the target event; The device is further used to: before acquiring a first picture taken by using a flash, determine a plurality of parameter information generated in advance based on a predetermined rule, wherein the value of the parameter information is unique within a predetermined time range; when the target event is detected, determine the first parameter information from the plurality of parameter information; and trigger the flash to flash based on the first parameter information to take the first picture; The device is also used to: obtain a first time when the first event indicates that the flash is used to capture a picture and a second time when the second event indicates that the flash is used to capture a picture, wherein the target event set includes the first event and the second event; obtain a recycle time period of the flash to obtain a neighborhood time of the first time, wherein the neighborhood time is the sum of the first time and the duration of the recycle time period; when the second time is within the neighborhood time of the first time, postpone the second time when the second event indicates that the flash is used to capture a picture to the next fill light time period after the recycle time period to capture a second picture, wherein the second picture is a picture having the same parameter information as the second event.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 5 when executed by a processor.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 5 are implemented.
