CN-122002033-A - Event data encoding method, device, electronic equipment and storage medium
Abstract
The invention discloses an event data coding method, an event data coding device, electronic equipment and a storage medium, wherein the method comprises the steps of determining a first coding value of each pixel according to an event occurrence state of each pixel in an event pixel array, determining a second coding value of each target pixel according to an event type of an event occurring in the target pixel if the pixel is the target pixel of the event, and outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel. The invention can stably output event data with low data volume.
Inventors
- HUANG JIEJUN
Assignees
- 深圳锐视智芯科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241101
Claims (10)
- 1. An event data encoding method, characterized in that the event data encoding method comprises: Determining a first coding value of each pixel according to the event occurrence state of each pixel in the event pixel array; If the pixel is a target pixel with an event, determining a second coding value of the target pixel according to the event type of the event which occurs in the target pixel; outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel.
- 2. The event data encoding method as claimed in claim 1, wherein the outputting the target event data according to the first encoded value of each pixel and the second encoded value of the target pixel comprises: summarizing first coding values corresponding to all pixels based on a first preset coding rule to obtain first coding data; Summarizing a second coding value corresponding to the target pixel based on a second preset coding rule to obtain second coding data; And outputting the target event data according to the first encoded data and the second encoded data.
- 3. The event data encoding method as claimed in claim 1, wherein the outputting the target event data according to the first encoded value of each pixel and the second encoded value of the target pixel comprises: If the pixel is the target pixel, obtaining target coding data of the pixel based on a first coding value and a second coding value corresponding to the pixel; If the pixel is not the target pixel, obtaining target coding data of the pixel based on the first coding value of the pixel; And outputting the target event data according to the target coding data of each pixel.
- 4. The method for encoding event data according to claim 1, wherein after determining the first encoded value of each pixel according to the event occurrence status of each pixel in the event pixel array, further comprising: if the event pixel array contains the target pixel, executing the first coding value according to each pixel and the second coding value of the target pixel, and outputting target event data; And if the event pixel array does not contain the target pixel, outputting target event data according to the first coding value of each pixel.
- 5. The event data encoding method according to claim 1, wherein the method further comprises: If the number of the target pixels in the event pixel array is greater than or equal to a preset threshold value, determining a target coding value of each pixel according to the event state of each pixel in the event pixel array, and outputting target event data according to the target coding value of each pixel; And if the number of the target pixels in the event pixel array is smaller than a preset threshold value, executing the event occurrence state according to each pixel in the event pixel array, and determining a first coding value of each pixel.
- 6. The method for encoding event data according to claim 1, wherein determining the first encoded value of each pixel according to the event occurrence status of each pixel in the event pixel array comprises: if the event occurrence state is an occurrence event state, setting a first preset value as a first coding value of the pixel; And if the event occurrence state is the event non-occurrence state, setting a second preset value as a first coding value of the pixel.
- 7. The event data encoding method as claimed in claim 1, wherein said determining a second encoded value of said target pixel according to an event type of an event occurring to said target pixel comprises: If the event type is a light intensity enhancement event, setting a third preset value as a second coding value of the target pixel; And if the event type is a light intensity weakening event, setting a fourth preset value as a second coding value of the target pixel.
- 8. An event data encoding device, characterized in that the event data encoding device comprises: the first coding module is used for determining a first coding value of each pixel according to the event occurrence state of each pixel in the event pixel array; the second coding module is used for determining a second coding value of the target pixel according to the event type of the event generated by the target pixel if the pixel is the target pixel of the event; and the output module is used for outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel.
- 9. An electronic device comprising a processor and a memory, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the event data encoding method of any of claims 1-7.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program for causing an electronic device to perform the steps of the event data encoding method of any of claims 1-7 when said computer program is run on the electronic device.
Description
Event data encoding method, device, electronic equipment and storage medium Technical Field The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for encoding event data, an electronic device, and a storage medium. Background The event camera outputs event data based on the light intensity variation event on each pixel, and the current encoding mode of the output event data is frame mode and event mode. The frame mode has the advantage of lower back-end decoding difficulty, but the amount of data it transmits tends to be larger. The event mode significantly reduces the amount of data when events are small, but its upper limit is not fixed, compared to the frame mode, which is very large when a large number of events are generated in some sports scenes. Therefore, in some motion scenes, the data amount output based on the event mode may even exceed the data amount output based on the frame mode in the same scene, so that the data amount of the event data output by encoding is large, the event data with low data amount cannot be stably output, and storage and transmission of the event data are not facilitated. Disclosure of Invention The embodiment of the invention provides an event data coding method, an event data coding device, electronic equipment and a storage medium, which aim to stably output event data with low data volume. In a first aspect, an embodiment of the present invention provides an event data encoding method, including: Determining a first coding value of each pixel according to the event occurrence state of each pixel in the event pixel array; If the pixel is a target pixel with an event, determining a second coding value of the target pixel according to the event type of the event which occurs in the target pixel; outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel. In a second aspect, an embodiment of the present invention provides an event data encoding apparatus, including: the first coding module is used for determining a first coding value of each pixel according to the event occurrence state of each pixel in the event pixel array; the second coding module is used for determining a second coding value of the target pixel according to the event type of the event generated by the target pixel if the pixel is the target pixel of the event; and the output module is used for outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel. In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of any of the event data encoding methods provided by the embodiments of the present invention. In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium, the computer readable storage medium including a computer program for causing an electronic device to perform the steps of any one of the event data encoding methods provided by the embodiments of the present invention when the computer program is run on the electronic device. The method comprises the steps of determining a first coding value of each pixel according to an event occurrence state of each pixel in an event pixel array, determining a second coding value of each target pixel according to an event type of an event occurring to the target pixel if the pixel is the target pixel of the event, and outputting target event data according to the first coding value of each pixel and the second coding value of the target pixel. Therefore, the pixel quantity of the generated event is less, compared with the frame mode, the event quantity of the output target event data can be obviously reduced, and in a motion scene with more pixel quantity of the generated event quantity, the event quantity of the output target event data can be ensured not to exceed the event quantity coded and output by the frame mode, so that the event data with low data quantity can be stably output, and the transmission and storage of the event data are facilitated. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. FIG. 1 is a flow chart of one embodiment of a method for encoding event data provided in an embodiment of the present invention; FIG. 2 is a flow chart of another embodiment of an event data encoding method provided in an embodiment o