Image restoration device, image restoration method, and image restoration program
The image restoration device simplifies the computational load for event camera image restoration by initializing and updating luminance arrays with polarity values, correcting intermediate values based on movement direction, effectively reducing processing complexity and enhancing accuracy.
Patent Information
- Application Number
- JP2020180824
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-11-15
- Filing Date
- 2020-10-28
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2040-10-28
AI Technical Summary
Existing image restoration techniques using event cameras require complex calculations and high computational loads due to the estimation of optical flow and brightness over the entire surface of a moving object, particularly at edges, leading to increased processing demands.
An image restoration device and method that initializes a luminance array list with intermediate values, updates the list by overwriting pixel coordinates with polarity values at event firing times, and corrects intermediate values based on relative movement direction, simplifying the calculation process to reduce computational load.
The method allows for the restoration of binary images with reduced computational load by utilizing simple overwrite calculations, accurately representing actual brightness values while minimizing processing defects and noise interference.
Smart Images

Figure 0007571467000001 
Figure 0007571467000002 
Figure 0007571467000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to image restoration techniques that reconstruct a binary image based on the output from an event camera. [Background technology]
[0002] Event cameras, which have excellent time resolution, are known as cameras that mimic the human perception system. When an event camera captures an object, it outputs pixel coordinates and polarity values of the event, which changes the luminance of at least one camera pixel, in association with the time of the event.
[0003] Such a technology for restoring a luminance image based on the output of an event camera is disclosed, for example, in Non-Patent Document 1. Here, in the technology disclosed in Non-Patent Document 1, the optical flow and luminance of a subject moving relative to the event camera are simultaneously estimated by optimizing a cost function to restore the luminance image. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] P. Bardow, AJ Davison, and S. Leutenegger. Simultaneous Optical Flow and Intensity Estimation From an Event Camera. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 884-892, 2016. Summary of the Invention [Problem to be solved by the invention]
[0005] However, the target of simultaneous estimation of optical flow and brightness in the technology disclosed in Non-Patent Document 1 is limited to the edge part of the photographed surface of the subject where the camera pixels can detect brightness changes due to relative motion. Therefore, in order to expand the brightness estimation to the entire photographed surface of the subject and restore the brightness image, the calculation process becomes complicated, and the calculation load increases.
[0006] An object of the present disclosure is to provide an image restoration device that reduces the computational load required for image restoration. Another object of the present disclosure is to provide an image restoration method that reduces the computational load required for image restoration. Yet another object of the present disclosure is to provide an image restoration program that reduces the computational load required for image restoration. [Means for solving the problem]
[0007] The technical means of the present disclosure for solving the problems will be described below. Note that the claims and the reference characters in parentheses in this section indicate the corresponding relationship with the specific means described in the embodiments described later in detail, and do not limit the technical scope of the present disclosure.
[0008] A first aspect of the present disclosure is a method for manufacturing a semiconductor device comprising: An image restoration device (3) that restores a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that captures an image of a black-and-white subject (4) moving relatively within a capture period, in association with an event occurrence time (t) in which a luminance change occurs in at least one camera pixel, the image restoration device comprising: The black-and-white subject is a binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and cell edges are provided at the boundaries between the white cells and the black cells; In the brightness array list (L), which stores one of a pair of polarity values and their intermediate values as the brightness value for each pixel coordinate, the brightness value of each pixel coordinate is The brightness is darker than the white cell and brighter than the black cell, and the polarity value of the white cell and the polarity value of the black cell are different. An initialization unit (100) that initializes to an intermediate value; an update unit (120) that updates the luminance array list initialized by the initialization unit according to pixel coordinates and polarity values for each event; an output unit (160) that outputs the luminance array list updated by the update unit over the shooting period as a binary image; The update by the update unit overwrites the brightness value of the firing coordinates, which are pixel coordinates where an event is fired, in the brightness array list with the polarity value of the event, while retaining the brightness value of the non-firing coordinates, which are pixel coordinates excluding the firing coordinates in the brightness array list. and detecting cell edges based on a transition from the neutral value to the polarity value, and outputting the binary image based on the detected cell edges. . A second aspect of the present disclosure is An image restoration device (3) that restores a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that captures an image of a black-and-white subject (4) moving relatively within a capture period, in association with an event occurrence time (t) in which a luminance change occurs in at least one camera pixel, the image restoration device comprising: an initialization unit (100) for initializing a luminance value of each pixel coordinate to an intermediate value in a luminance array list (L) that stores one of a pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update unit (120) that updates the luminance array list initialized by the initialization unit according to pixel coordinates and polarity values for each event; an output unit (160) that outputs the luminance array list updated by the update unit over the shooting period as a binary image; The update by the update unit overwrites the luminance value of the ignition coordinate, which is the pixel coordinate where the event is fired, in the luminance array list with the polarity value of the event, while retaining the luminance value of the non-ignition coordinate, which is the pixel coordinate excluding the ignition coordinate in the luminance array list; The image capturing apparatus further includes a correction unit (140) that corrects a luminance value of an intermediate coordinate, which is a pixel coordinate where an intermediate value is stored, in the luminance array list updated by the update unit over the shooting period, The correction by the correction unit sets the relative movement direction (M) of the black and white subject with respect to the event camera as the search direction (S), searches for a target coordinate that is closest in the search direction from the intermediate coordinate among pixel coordinates in which any polarity value is stored in the brightness array list, and overwrites the polarity value of the target coordinate with the brightness value of the intermediate coordinate in the brightness array list.
[0009] The present disclosure 3 The aspect is An image restoration method executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity values (p) of events output from an event camera (2) that captures a black-and-white object (4) moving relatively within a capture period, the pixel coordinates (x, y) and polarity values (p) of the events being associated with a time (t) of occurrence of an event in which luminance has changed in at least one camera pixel, the method comprising: The black-and-white subject is a binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and cell edges are provided at the boundaries between the white cells and the black cells; In the brightness array list (L), which stores one of a pair of polarity values and their intermediate values as the brightness value for each pixel coordinate, the brightness value of each pixel coordinate is The brightness is darker than the white cell and brighter than the black cell, and the polarity value of the white cell and the polarity value of the black cell are different. An initialization process (S101) for initializing to an intermediate value; An update process (S102, S202) for updating the luminance array list initialized by the initialization process according to pixel coordinates and polarity values for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update process as a binary image; The update process overwrites the brightness values of the firing coordinates, which are the pixel coordinates where the event was fired, in the brightness array list with the polarity value of the event, while retaining the brightness values of the non-firing coordinates, which are the pixel coordinates excluding the firing coordinates in the brightness array list. Then, the edge of the cell is detected based on the transition from the neutral value to the polarity value, and a binary image is output based on the detected edge of the cell. . A fourth aspect of the present disclosure is An image restoration method executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity values (p) of events output from an event camera (2) that captures a black-and-white object (4) moving relatively within a capture period, the pixel coordinates (x, y) and polarity values (p) of the events being associated with a time (t) of occurrence of an event in which luminance has changed in at least one camera pixel, the method comprising: An initialization process (S101) for initializing the luminance value of each pixel coordinate to an intermediate value in a luminance array list (L) that stores one of a pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; An update process (S102, S202) for updating the luminance array list initialized by the initialization process according to pixel coordinates and polarity values for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update process as a binary image; The update process overwrites the brightness values of the firing coordinates, which are pixel coordinates where an event is fired, in the brightness array list with the polarity value of the event, while retaining the brightness values of the non-firing coordinates, which are pixel coordinates excluding the firing coordinates in the brightness array list. The method further includes a correction process (S103) for correcting the luminance values of intermediate coordinates, which are pixel coordinates where intermediate values are stored, in the luminance array list updated over the shooting period by the update process; The correction process sets the relative movement direction (M) of the black and white subject with respect to the event camera as the search direction (S), searches for a target coordinate that is closest in the search direction from the intermediate coordinate among pixel coordinates in which any polarity value is stored in the brightness array list, and overwrites the polarity value of the target coordinate with the brightness value of the intermediate coordinate in the brightness array list.
[0010] The present disclosure 5 The aspect is An image restoration program stored in a storage medium (10) and including instructions to be executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that has captured an image of a black-and-white subject (4) moving relative to another object during a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being associated with an event time (t) at which an event in which luminance has changed in at least one camera pixel is captured, the image restoration program comprising: The black-and-white subject is a binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and cell edges are provided at the boundaries between the white cells and the black cells; The command is, In the brightness array list (L), which stores one of a pair of polarity values and their intermediate values as the brightness value for each pixel coordinate, the brightness value of each pixel coordinate is The brightness is darker than the white cell and brighter than the black cell, and the polarity value of the white cell and the polarity value of the black cell are different. An initialization process (S101) for initializing to an intermediate value; An update process (S102, S202) for updating the luminance array list initialized by the initialization process according to pixel coordinates and polarity values for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update unit process as a binary image; The update process overwrites the brightness values of the firing coordinates, which are pixel coordinates where an event is fired, in the brightness array list with the polarity value of the event, while retaining the brightness values of the non-firing coordinates, which are pixel coordinates excluding the firing coordinates in the brightness array list. Detecting cell edges based on transitions from neutral values to polarity values, and outputting a binary image based on the detected cell edges. . A sixth aspect of the present disclosure is An image restoration program stored in a storage medium (10) and including instructions to be executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that has captured an image of a black-and-white subject (4) moving relative to another object during a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being associated with an event time (t) at which an event in which luminance has changed in at least one camera pixel is captured, the image restoration program comprising: The command is, An initialization process (S101) for initializing the luminance value of each pixel coordinate to an intermediate value in a luminance array list (L) that stores one of a pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; An update process (S102, S202) for updating the luminance array list initialized by the initialization process according to pixel coordinates and polarity values for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update unit process as a binary image; The update process overwrites the brightness values of the firing coordinates, which are pixel coordinates where an event is fired, in the brightness array list with the polarity value of the event, while retaining the brightness values of the non-firing coordinates, which are pixel coordinates excluding the firing coordinates in the brightness array list. The method further includes a correction process (S103) for correcting the luminance values of intermediate coordinates, which are pixel coordinates where intermediate values are stored, in the luminance array list updated over the shooting period by the update process; The correction process sets the relative movement direction (M) of the black and white subject with respect to the event camera as the search direction (S), searches for a target coordinate that is closest in the search direction from the intermediate coordinate among pixel coordinates in which any polarity value is stored in the brightness array list, and overwrites the polarity value of the target coordinate with the brightness value of the intermediate coordinate in the brightness array list.
[0011] These 1st to 5th 6 According to the embodiment, for the brightness array list in which the brightness value of each pixel coordinate is initialized to an intermediate value, the update according to the pixel coordinate and polarity value for each event overwrites the brightness value of the ignition coordinate with the polarity value of the event. At this time, the polarity value overwritten and calculated on the brightness value may represent the actual brightness of a portion of the photographed surface of the black and white subject that ignites an event at the camera pixel due to relative movement. 6 According to an embodiment, the update to the initialized brightness array list holds the brightness values of the non-ignition coordinates excluding the firing coordinates during the overwrite operation. As a result, the polarity values held in the non-ignition coordinates switched from the firing coordinates after the overwrite operation of the polarity values may represent the actual brightness of the portion of the photographed surface that does not ignite an event even by relative movement.
[0012] For these reasons, items 1 to 4 6 The brightness array list updated over the shooting period according to the embodiment can be output as a binary image in which polarity values corresponding to the actual brightness are stored at each pixel coordinate corresponding to the photographed surface. As a result, the binary image can be restored by a simple calculation process called overwrite calculation, so that the calculation load required for image restoration can be reduced. [Brief description of the drawings]
[0013] [Figure 1] 1 is a block diagram showing an overall configuration of an image system according to a first embodiment. [Diagram 2] FIG. 11 is a block diagram showing a detailed configuration of an image restoration device in an image system according to a second embodiment. [Diagram 3] FIG. 2 is a perspective view for illustrating a relative movement relationship between the event camera and a black-and-white subject according to the first embodiment. [Figure 4] FIG. 2 is a plan view showing a subject according to the first embodiment. [Diagram 5] FIG. 4 is a schematic diagram for explaining event data according to the first embodiment. [Figure 6] FIG. 2 is a schematic diagram for explaining a luminance arrangement list according to the first embodiment. [Figure 7] FIG. 4 is a schematic diagram for explaining an initialization process according to the first embodiment. [Figure 8] FIG. 4 is a schematic diagram for explaining an update process according to the first embodiment. [Figure 9] FIG. 4 is a schematic diagram for explaining a first sub-correction process according to the first embodiment. [Figure 10] 6A to 6C are schematic diagrams for explaining a second sub-correction process according to the first embodiment. [Figure 11] FIG. 2 is a schematic diagram for explaining a binary image according to the first embodiment. [Figure 12] 4 is a flowchart showing an image restoration method according to the first embodiment. [Figure 13] 10 is a flowchart showing an image restoration method according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, a number of embodiments will be described with reference to the drawings. In addition, by assigning the same reference numerals to corresponding components in each embodiment, duplicated descriptions may be omitted. When only a part of the configuration is described in each embodiment, the configuration of the other embodiment described above can be applied to the other parts of the configuration. In addition to the combination of configurations explicitly stated in the description of each embodiment, configurations of multiple embodiments can be partially combined together even if not explicitly stated, as long as there is no particular problem with the combination.
[0015] (First embodiment) 1 and 2, an image system 1 according to a first embodiment includes an event camera 2 and an image restoration device 3. In the image system 1, a binary image B as a two-tone luminance image is restored by the image restoration device 3 based on the output from the event camera 2 that has captured an image of a two-tone black-and-white subject 4. In the binary image B restored by the image restoration device 3, the luminance value (i.e., gradation value) representing the black portion of the black-and-white subject 4 is "0," and the luminance value representing the white portion of the subject 4 is "1."
[0016] The event camera 2 is installed in a state where a specific relative motion relationship is established between the event camera 2 and the black-and-white subject 4 to be photographed. The specific relative motion relationship is a so-called translational motion relationship in which the direction of the optical flow generated during the photographing period due to the relative motion with respect to the event camera 2 is the same over the entire area of the surface 40 photographed by the event camera 2 of the black-and-white subject 4. An example of this translational motion relationship is the relationship shown in FIG. 3, in which the planar black-and-white subject 4 moves linearly relative to the event camera 2, which is fixed in position, in only one direction M perpendicular to the camera axis. In this embodiment, a translational motion relationship is assumed in which, as shown in FIG. 4, a two-dimensional code drawn in two gradations of black and white is printed or attached to a factory product, for example, and photographed by the event camera 2, which is fixed in position, while moving linearly by conveyor movement or the like. The two-dimensional code shown in FIG. 4 is a QR code (registered trademark of DENSO WAVE). However, it may be, for example, a barcode or the like.
[0017] As shown in FIG. 3, the event camera 2 captures the photographed surface 40 of the black-and-white subject 4, which moves relatively within a predetermined photographing period, within the camera angle of view throughout the photographing period. The event camera 2 detects incident light from within the camera angle of view using a plurality of camera pixels two-dimensionally arranged in the horizontal and vertical directions. In the event camera 2, the luminance change of the incident light detected for each camera pixel is monitored in chronological order during the photographing period. As a result, when the amount of luminance change in the increasing or decreasing direction in at least one camera pixel is equal to or greater than a threshold value in log order, it is determined that an event has been fired, and event data D is output from the event camera 2. As shown in FIG. 5, the event data D is generated as a data set for outputting pixel coordinates x, y and polarity value p of the event in association with the firing time t of the event. Note that in FIG. 5 and FIGS. 6 to 8 described later, the maximum values of each coordinate x and y in the vertical and horizontal directions are represented by X and Y, respectively.
[0018] The pixel coordinates x, y define the two-dimensional vertical and horizontal position of the camera pixel where the luminance has changed by more than the threshold value, using coordinate values. The polarity value p defines the direction of increase or decrease of the luminance change by more than the threshold value, using a binary value. In particular, in this embodiment, the polarity value p representing the direction of increase in luminance from black to white is defined as "1", while the polarity value p representing the direction of decrease in luminance from white to black is defined as "0". Thus, in the event data D, the direction of increase or decrease in luminance change at the pixel coordinates x, y where the event was fired is represented by a pair of polarity values p.
[0019] The image restoration device 3 shown in Figs. 1 and 2 is connected to the event camera 2 via at least one of a LAN (Local Area Network), a wire harness, and an internal bus. As shown in Fig. 1, the image restoration device 3 is a dedicated computer including at least one memory 10 and a processor 12. The memory 10 is at least one type of non-transitory tangible storage medium, such as a semiconductor memory, a magnetic medium, and an optical medium, that non-temporarily stores or stores computer-readable programs and data. The processor 12 includes at least one type of a central processing unit (CPU), a graphics processing unit (GPU), and a reduced instruction set computer (RISC)-CPU as a core.
[0020] The processor 12 executes a plurality of instructions included in the image restoration program stored in the memory 10. In this way, the image restoration device 3 constructs a plurality of functional blocks for restoring the binary image B based on the event data D output from the event camera 2. In this manner, in the image restoration device 3, the image restoration program stored in the memory 10 causes the processor 12 to execute a plurality of instructions to restore the binary image B, thereby constructing a plurality of functional blocks. The plurality of functional blocks constructed by the image restoration device 3 include an initialization block 100, an update block 120, a correction block 140, and an output block 160, as shown in FIG. 2.
[0021] The initialization block 100 prepares a luminance array list L in a predetermined data storage area in the memory 10. As shown in FIG. 6, the luminance array list L is prepared as a data set in which a luminance value I and a timestamp T are associated and stored for each of two-dimensional pixel coordinates x, y corresponding to all camera pixels of the event camera 2. The luminance value I stored in the luminance array list L is either one of a pair of polarity values p corresponding to the two-level luminance value of the binary image B and their intermediate value m. The intermediate value m is defined as a range between the two values of the pair of polarity values p. In particular, in this embodiment, the intermediate value m is defined as "0.5", which is the median value between "1", which is the polarity value p in the luminance increasing direction corresponding to the white luminance value of the binary image B, and "0", which is the polarity value p in the luminance decreasing direction corresponding to the black luminance value of the same image B.
[0022] 7, the initialization block 100 initializes all of the luminance values I of each pixel coordinate x, y in the luminance array list L to an intermediate value m. At the same time, the initialization block 100 initializes all of the timestamps T of each pixel coordinate x, y in the luminance array list L to a reset value of "0." These initialization processes are realized by the initialization block 100 before or at the start of the shooting period by the event camera 2.
[0023] 2 acquires event data D for each event during a shooting period from the event camera 2. The update block 120 may acquire the event data D output from the event camera 2 at each firing time t, at the same time t. The update block 120 may acquire the event data D output from the event camera 2 at each firing time t and buffered in the memory 10 during a set period, such as during a shooting period, all at once after the set period.
[0024] The update block 120 updates the luminance array list L according to the firing time t, pixel coordinates x, y, and polarity value p contained in the event data D for each event for which the event data D is acquired. The update block 120 may update the luminance array list L for each firing time t at which the event data D is acquired. The update block 120 may update the luminance array list L for each extraction by sequentially extracting data for each firing time t from the buffered event data D. In the following, the update process in either case will be described in detail as a process for each event.
[0025] 8, the update block 120 of the update process sets pixel coordinates x, y in the luminance array list L corresponding to pixel coordinates x, y at the firing time t in the event data D to firing coordinates xf, yf at the firing time t when the event is fired. At the same time, the update block 120 sets all pixel coordinates x, y in the luminance array list L except for the firing coordinates xf, yf to non-firing coordinates xn, yn at the firing time t.
[0026] The update block 120 of the update process overwrites and calculates the luminance value I of the ignition coordinates xf, yf at the ignition time t in the luminance array list L with the polarity value p of the event at the ignition time t in the event data D. At the same time, the update block 120 overwrites and calculates the timestamp T of the ignition coordinates xf, yf at the ignition time t in the luminance array list L with the ignition time t of the event in the event data D. At this time, the update block 120 of this embodiment sets the start time of the shooting period as the reference "0" second, replaces the ignition time t with the elapsed time from the start time, and saves it in the timestamp T.
[0027] The update block 120 of the one-way overwrite update process holds the luminance value I of the coordinates where the time difference between the ignition time t and the time stamp T is within the allowable time range among the non-ignition coordinates xn,yn at the ignition time t in the luminance array list L as the saved value at the ignition time t. As a result, the luminance value I of the non-ignition coordinate xn,yn switched from the ignition coordinate xf,yf in the luminance array list L is held within the allowable time range from the ignition time t of the coordinates xf,yf before the switch.
[0028] However, for the luminance value I of the non-ignition coordinates xn,yn at the ignition time t in the luminance array list L, where the time difference between the ignition time t and the time stamp T is outside the allowable time range, the update block 120 returns it to the intermediate value m by overwriting calculation. As a result, the luminance value I of the non-ignition coordinate xn,yn switched from the ignition coordinate xf,yf in the luminance array list L is overwritten by the intermediate value m if it is outside the allowable time range from the ignition time t of the coordinates xf,yf before the switch.
[0029] In addition, the allowable time range for switching the contents of the update process based on the time difference in this manner may be set to less than the upper limit of the time difference at which the brightness value I should be maintained, or may be set to less than the lower limit of the time difference at which the brightness value I should be overwritten and calculated with the intermediate value m.
[0030] 2 corrects the luminance array list L updated over the shooting period by the update block 120. That is, the correction block 140 corrects the luminance array list L updated according to the event data D of all events in the shooting period. In the following, the correction process by the correction block 140 will be described in detail as a process for the luminance array list L after full update.
[0031] The correction block 140 of the correction process sets all pixel coordinates x, y in which the intermediate value m is stored in the luminance array list L after full update to intermediate coordinates xm, ym. Under this setting, the update block 120 executes a first sub-correction process and a second sub-correction process to correct the luminance value I of the intermediate coordinates xm, ym in the luminance array list L from the intermediate value m to an appropriate value. In the following, in order to explain the first sub-correction process, FIG. 9 shows an image of the entire luminance array list L. Meanwhile, in order to explain the second sub-correction process, FIG. 10 shows an image of a part of the luminance array list L.
[0032] The correction block 140 of the first sub-correction process extracts intermediate coordinates xm, ym constituting an edge portion of the luminance array list L as starting coordinates xs, ys as shown in Fig. 9. At this time, the correction block 140 sets the intermediate coordinates xm, ym where at least one of the coordinates x, y in the vertical and horizontal directions is the minimum or maximum value (Fig. 9 shows an example where both are the minimum value) as the starting coordinates xs, ys. The correction block 140 of the first sub-correction process overwrites the luminance value I of the coordinates xs, ys that are directly or indirectly continuous with the starting coordinates xs, ys through other intermediate coordinates xm, ym among the intermediate coordinates xm, ym in the luminance array list L, and the luminance value I of the same coordinates xs, ys, with the polarity value p of one specific side. Here, when the black-and-white subject 4 is a two-dimensional code, the value "1" that indicates the luminance increasing direction corresponding to the white luminance value of the binary image B is overwritten and calculated as the polarity value p of one specific side to the starting coordinates xs, ys and its continuous coordinates. In the present disclosure, the process of "updating by the update unit is to overwrite the luminance values of the ignition coordinates, which are pixel coordinates where an event is fired, in the luminance array list with the polarity value of the event, while retaining the luminance values of the non-ignition coordinates, which are pixel coordinates excluding the ignition coordinates in the luminance array list" is performed by this first sub-correction process. From that viewpoint, the first sub-correction process is the main process.
[0033] The correction block 140 of the second sub-correction process sets the relative movement direction M of the black-and-white subject 4 with respect to the event camera 2 to the search direction S as shown in FIG. 10. At this time, the relative movement direction M is set to the search direction S by, for example, calculating based on the output value from the acceleration sensor. The correction block 140 of the second sub-correction process searches for the target coordinate xc, yc that is closest to the search direction S from among the intermediate coordinates xm, ym in the brightness array list L, where the brightness value I remains as the intermediate value m even after the first sub-correction process. The correction block 140 of the second sub-correction process overwrites the brightness value I of the remaining coordinate of the intermediate value m in the brightness array list L with the polarity value p of the target coordinate xc, yc. As a result, the polarity value p of the target coordinate xc, yc is copied to the brightness value I of the remaining coordinate in the opposite direction O to the search direction S shown in FIG. 10. By adding the second sub-correction process in this manner, the polarity value p can be identified without waiting for the completion of reading all of the event data D by the first sub-correction process, which is the main process.
[0034] 2 outputs the luminance array list L, which has been updated by the update block 120 over the shooting period and has also been corrected by the correction block 140, as a binary image B. That is, the output block 160 restores the latest luminance array list L, which has been updated by the event data D at all ignition times t during the shooting period and then corrected to one of the polarity values p for the intermediate coordinates xm, ym, as a binary image B to be output as shown in FIG.
[0035] From the explanation so far, in the first embodiment, the initialization block 100 corresponds to the "initialization unit", and the update block 120 corresponds to the "update unit". Also, in the first embodiment, the correction block 140 corresponds to the "correction unit", and the output block 160 corresponds to the "output unit".
[0036] An image restoration flow, which is a flow of an image restoration method in which the image restoration device 3 restores the binary image B by cooperation of the blocks 100, 120, 140, and 160, will be described with reference to Fig. 12. Note that this image restoration flow starts before or when the shooting period by the event camera 2 starts. Also, in this image restoration flow, "S" refers to multiple steps of the flow that are executed by multiple commands included in the image restoration program.
[0037] In S101, the initialization block 100 initializes the luminance array list L prepared in the memory 10. At this time, the initialization block 100 initializes the luminance value I and the time stamp T of each pixel coordinate x, y in the luminance array list L to the intermediate value m and the reset value, respectively.
[0038] In S102 following S101, the update block 120 updates the luminance array list L initialized in S101 according to the event data D for each event. At this time, as an update process for each event, the update block 120 overwrites and calculates the luminance value I and timestamp T of the ignition coordinates xf, yf in the luminance array list L with the polarity value p and ignition time t of the event, respectively. At the same time, as an update process for each event, the update block 120 overwrites and calculates the luminance value I of the coordinates of the non-ignition coordinates xn, yn in the luminance array list L, where the time difference between the ignition time t and the timestamp T is outside the allowable time range, with the intermediate value m. As a result, the luminance value I of the non-ignition coordinates xn, yn switched from the ignition coordinates xf, yf in the luminance array list L is overwritten and calculated with the intermediate value m if it is outside the allowable time range from the ignition time t of the coordinates xf, yf before the switch.
[0039] Furthermore, while these overwrite calculations are being performed, the update block 120 in S102, which is an update process for each event, holds the luminance value I of the non-ignition coordinate xn,yn in the luminance array list L, where the time difference between the ignition time t and the time stamp T is within the allowable time range. As a result, the luminance value I of the non-ignition coordinate xn,yn switched from the ignition coordinate xf,yf in the luminance array list L is held within the allowable time range from the ignition time t of the coordinate xf,yf before the switch.
[0040] In S103 following S102, the correction block 140 corrects the luminance array list L updated by the update block 120 according to the event data D of all events over the shooting period. At this time, as a first sub-correction process, the correction block 140 overwrites the luminance value I of the starting coordinate xs, ys of the edge part and the luminance value I of the coordinates consecutive to the coordinate xs, ys among the intermediate coordinates xm, ym where the intermediate value m is stored in the luminance array list L after the full update, with the polarity value p of a specific one. As described above, this first sub-correction process is the main process. Also, as a second sub-correction process, the correction block 140 overwrites the luminance value I of the remaining coordinates that remain as the intermediate value m after the intermediate coordinates xm, ym in the luminance array list L after the first sub-correction process, with the polarity value p of the target coordinates xc, yc that are closest to the remaining intermediate coordinates xm, ym in the search direction S. At this time, the search direction S is set to the relative movement direction M of the black-and-white subject 4 with respect to the event camera 2. The processing speed can be improved by this second sub-correction process.
[0041] In S104 following S103, the output block 160 outputs the luminance array list L, which has been updated over the shooting period in S102 and then corrected by the correction block 140, as a binary image B. This completes the image restoration flow for one shooting period.
[0042] From the above description, in the first embodiment, S101 corresponds to the “initialization process”, and S102 corresponds to the “update process”. Also, in the first embodiment, S103 corresponds to the “correction process”, and S104 corresponds to the “output process”.
[0043] (Action and effect) The effects of the first embodiment described above will be described below.
[0044] According to the first embodiment, for the brightness array list L in which the brightness value I of each pixel coordinate x, y is initialized to the intermediate value m, the update according to the pixel coordinate x, y and the polarity value p for each event overwrites the brightness value I of the ignition coordinate xf, yf with the polarity value p of the event. At this time, the polarity value p overwritten with the brightness value I may represent the actual brightness of the ignition part (i.e., the brightness change part that gives a brightness change) that ignites an event in the camera pixel by relative movement in the photographed surface 40 of the black-and-white subject 4. Also, according to the first embodiment, the update of the initialized brightness array list L holds the brightness value I of the non-ignition coordinate xn, yn excluding the ignition coordinate xf, yf, while performing such an overwriting calculation. As a result, the polarity value p held in the non-ignition coordinate xn, yn that is switched from the ignition coordinate xf, yf after the overwriting calculation of the polarity value p may represent the actual brightness of the non-ignition part that does not ignite an event even by relative movement in the photographed surface 40.
[0045] From these, the luminance array list L updated over the shooting period according to the first embodiment can be output as a binary image B storing a polarity value p corresponding to the actual luminance at each pixel coordinate x, y corresponding to the photographed surface 40. As described above, the binary image B can be restored by a simple calculation process called an overwrite calculation, so that it is possible to reduce the calculation load required for image restoration.
[0046] According to the first embodiment, the luminance value I of the intermediate coordinates xm, ym where the intermediate value m is stored in the luminance array list L updated over the shooting period is overwritten by the polarity value p of the coordinate of interest xc, yc that is closest in the search direction S to the intermediate coordinates xm, ym. At this time, by setting the search direction S to the relative movement direction M of the black-and-white subject 4 with respect to the event camera 2, the polarity value p that is more likely to represent the actual luminance of the photographed surface 40 in the direction M can be restored by replacing it with the intermediate value m. Therefore, it is possible to suppress poor restoration of the binary image B caused by the remaining intermediate value m.
[0047] According to the first embodiment, the luminance value I of the non-ignition coordinate xn,yn switched from the ignition coordinate xf,yf in the luminance array list L is held at the polarity value p of the pre-switching coordinate xf,yf within the allowable time range from the ignition time t of the pre-switching coordinate xf,yf. As a result, the polarity value p held at the non-ignition coordinate xn,yn switched from the ignition coordinate xf,yf within the allowable time range can represent the actual luminance of the non-ignition part of the photographed surface 40 where the event will not be fired by the relative movement after the event firing. Therefore, the restoration of the binary image B in the non-ignition part, which conventionally required the estimation of the optical flow, can be realized by a simple calculation process, thereby reducing the calculation load.
[0048] According to the first embodiment, the luminance value I of the non-ignition coordinates xn,yn switched from the ignition coordinates xf,yf in the luminance array list L is overwritten with the initial intermediate value m outside the allowable time range from the ignition time t of the coordinates xf,yf before switching. As a result, even if the luminance value I is overwritten with the incorrect polarity value p at the ignition coordinates xf,yf when an event ignition occurs due to noise, the luminance value I can be restored to the normal intermediate value m because the subsequent event ignition does not occur until outside the allowable time range. Therefore, it is possible to suppress poor restoration of the binary image B caused by noise.
[0049] According to the first embodiment, the direction of the optical flow generated during the shooting period due to the relative motion with respect to the event camera 2 is the same over the entire area of the surface 40 to be shot by the event camera 2. This makes it difficult for the polarity value p of the non-ignition coordinates xn,yn, which is switched from the ignition coordinates xf,yf after the overwrite calculation of the polarity value p, to deviate from the actual brightness of the non-ignition part. Therefore, it is possible to restore the binary image B even by simple calculation processing.
[0050] In the first embodiment, in which the two-dimensional code that moves relative to the event camera 2 during the shooting period is restored as a black-and-white subject 4, the polarity value p of the non-ignition coordinates xn,yn that are switched from the ignition coordinates xf,yf after the overwriting calculation of the polarity value p can accurately represent the actual brightness of the non-ignition part. Therefore, it is possible to restore the binary image B with high accuracy even by simple calculation processing.
[0051] Next, the first embodiment will be described from a different perspective. First, the black-and-white subject 4 to be read in the present disclosure is not limited to a QR code (registered trademark of DENSO WAVE) as described above, but may be another two-dimensional code or a barcode. Usually, it is printed in white and black, but it may have color as long as it is light and dark. Therefore, white and black used in the following description mean light and dark colors.
[0052] In the case of a QR code, as shown in Figures 1 to 3, it has a square finding pattern 4a at three corners of the code, and inside the code, square white cells and similarly square black cells are arranged, and the arrangement of these cells determines the information. The width of the outermost square black part of the finding pattern 4a is the same as the width of the cells, the width of the inner square white part is also the same as the width of the cells, and the width of the central square black part is three times the width of the cells. In any case, the printed QR code is a combination of white and black square shapes.
[0053] Figure 4 shows an image of a QR code restored by image restoration device 3. In its printed state, the QR code is not deformed as shown in Figure 4. However, since the QR code judges the brightness (white, black) of the center of the cell, it is possible to read the information even from a QR code restored as in Figure 4.
[0054] Also, the event camera 2 has a large number of camera pixels (hereinafter referred to as pixels) as shown in the brightness array list L of FIG. 9. In the examples of FIGS. 6 to 8, the event camera 2 has, for example, 1280 pixels (x is 1 to 1280) in the horizontal direction and, for example, 720 pixels (y is 1 to 720) in the vertical direction. The photographed surface 40 shown in FIG. 3 varies depending on the distance between the event camera 2 and the black and white subject 4, but is usually sufficiently large in area compared to the black and white subject 4 (QR code). Therefore, only a part of the photographed surface 40 is shown in FIG. 3. As an example of the size of the photographed surface 40 and the size of the black and white subject 4 (QR code), the image in FIG. 11 is easy to understand. For example, if the size of the photographed surface 40 is 128 mm in the horizontal direction and 72 mm in the vertical direction, 0.01 mm square of the photographed surface 40 corresponds to one pixel of the event camera 2.
[0055] As shown in Figure 5, when a change in luminance (brightness) occurs (when an event occurs), the event camera 2 records the coordinates x, y of the pixel where the change occurred, the polarity value p which is the change in luminance (brightness), and the time t of the event as event data D. Therefore, if there is no event, the event camera 2 does not record anything new, and the event data D is not updated. On the other hand, if there is an event, the event is recorded at an extremely short time. Depending on the performance of the event camera 2, it may be possible to record even one microsecond (one millionth of a second), for example.
[0056] In the example of Figure 5, it is recorded that an event (firing) in which the polarity value p changes to 1 occurred at a time of 0.5 milliseconds (0.5 thousandths of a second) at a pixel with an x coordinate of 1 and a y coordinate of Y-1 (719 in the example of 720 pixels). Also, at a time of 0.5 milliseconds, a firing in which the polarity value p changes to 0 is recorded at a pixel with an x coordinate of X (1280 in the example of 1280 pixels) and a y coordinate of Y-1 (719). At a time of 0.7 milliseconds, a firing in which the polarity value p changes to 1 is recorded at a pixel with an x coordinate of 2 and a y coordinate of Y-1 (719), and even at a time of 1 millisecond, a firing in which the polarity value p changes to 1 is recorded at a pixel with an x coordinate of 2 and a y coordinate of Y-1 (719).
[0057] Note that the event camera 2 detects changes in luminance (brightness), but does not detect the absolute value of luminance (brightness). As described above, the amount of change in luminance is detected in log order. For example, if luminance (brightness) is resolved into 128 values from black (0) to white (1) and the threshold for detecting changes is 10 / 128, when the brightness becomes 10 / 128 or more brighter than before the change, a polarity value p of "1" is recorded, and when the brightness becomes 10 / 128 or more darker, a polarity value p of "0" is recorded. In this example, when the absolute value of luminance (brightness) is 0.5 before the change and 0.3 after the change, the polarity value p of "0" is recorded because the brightness has become darker than the threshold, but when the absolute value of luminance (brightness) is 0 before the change and 0.3 after the change, the polarity value p of "1" is recorded because the brightness has become brighter than the threshold. In other words, even if the absolute value of luminance (brightness) is the same 0.3, the recorded polarity value p can be "0" or "1".
[0058] In relation to Figure 5 and Figure 6, Figure 6 shows the luminance array list L when the time is 1 millisecond. Since no change in luminance (brightness) (firing) occurs in pixels other than the pixel with x coordinate 1 and y coordinate Y-1 (719), the pixel with x coordinate X (1280) and y coordinate Y-1 (719), and the pixel with x coordinate 2 and y coordinate Y-1 (719), the time remains "0 milliseconds". Since a change in luminance (brightness) (firing) occurs in 0.5 milliseconds in the pixel with x coordinate 1 and y coordinate Y-1 (719) and the pixel with x coordinate X (1280) and y coordinate Y-1 (719), the time stamp T is set to "0.5 milliseconds" and the polarity value p is set to "1" and "0", respectively. At the pixel with x coordinate 2 and y coordinate Y-1 (719), a change in luminance (brightness) (firing) occurs twice, at 0.7 milliseconds and 1 millisecond, so the timestamps T for each occur are recorded in Figure 5. Also, in the example of Figure 6 showing the state at 1 millisecond, the polarity value p of "1" and the timestamp T of "1 millisecond" are recorded.
[0059] To repeat, the event camera 2 detects changes in luminance (brightness), so if there is no change, nothing is detected. Therefore, if the black-and-white subject 4 (QR code) is stationary and not moving, nothing is detected. Event data D is recorded only when the black-and-white subject 4 (QR code) moves.
[0060] In the above-mentioned assumed example in which the size of the photographed surface 40 is 128 mm in the horizontal direction and 72 mm in the vertical direction, and 1 mm square of the photographed surface 40 corresponds to 100 pixels of the event camera 2, if the width of the white square cell and the black square cell of the black and white subject 4 (QR code) is 1 mm, one cell of the black and white subject 4 (QR code) corresponds to 100 pixels of the event camera 2. This means that if the photographed surface 40 that receives light in one pixel is shown as a square, one side will be 0.1 mm. And if the black and white subject 4 (QR code) moves, for example, 10 centimeters per second, it moves 100 mm per second, which is equivalent to moving 1000 pixels per second. In other words, the edge of the cell of the black and white subject 4 (QR code) moves 1000 pixels in the relative movement direction M in one second. In terms of one pixel, the edge of the cell of the black and white subject 4 (QR code) passes through in 1 millisecond.
[0061] Note that the "edge of a cell of the black-and-white subject 4 (QR code)" means the boundary between a white cell and a black cell, and from the perspective of the white cell, there is the boundary where a black cell ends and a white cell begins, and the boundary where a white cell ends and a black cell begins. Similarly, from the perspective of the black cell, the start and end are the boundary.
[0062] If the resolution of the event camera 2 is 0.1 milliseconds (0.1 thousandths of a second), it can record 10 changes in brightness (brightness) when the edge of a cell of the black-and-white subject 4 (QR code) passes through one pixel. For example, if the initial brightness moves from a black cell (brightness value 0) to a white cell (brightness value 1), and if a pixel at a specific coordinate is located in the event camera 2 where all of this brightness (brightness) change can be observed, the pixel at that coordinate can detect 10 changes in brightness (brightness) from the time when the black cell of the black-and-white subject 4 (QR code) is displayed in all areas (time 0 milliseconds) to the time when the white cell of the black-and-white subject 4 (QR code) is displayed in all areas (time 1 millisecond).
[0063] Therefore, in this example, one pixel of event camera 2 detects a change from an entirely black (brightness value 0) state (time 0 milliseconds) to an entirely white (brightness value 1) state (time 1 millisecond) 10 times. Since there is a brightness (brightness) change above the threshold value during these 10 times (from time 0 milliseconds to time 1 millisecond), the coordinates x, y of the specific pixel, the polarity value p of "1", and the firing time t are recorded in the event data D.
[0064] In the above assumed setting, if one side of one cell in the black-and-white subject 4 (QR code) corresponds to 10 pixels of the event camera 2, and the 10 pixels are continuous in the relative motion direction M, the first pixel and the last pixel, the 10th pixel, correspond to the edge of the cell of the black-and-white subject 4 (QR code), and black-and-white inversion can be detected. On the other hand, the second to ninth pixels do not correspond to the edge of the cell of the black-and-white subject 4 (QR code), and black-and-white inversion does not occur. In that case, the coordinates x, y, polarity value p "1" and firing time t are recorded 10 times (from time 0 milliseconds to time 1 millisecond) in the first pixel, and since there is no luminance (brightness) change above the threshold in the second to ninth pixels, event data D is not recorded. Since the last pixel, the 10th pixel, transitions from a white (brightness value 1) cell to a black (brightness value 0) cell, there is a luminance (brightness) change above the threshold, and the coordinates x, y, polarity value p "0" and firing time t are recorded.
[0065] In other words, at the edge of the cells where the black and white of the black and white subject 4 (QR code) are inverted, a change in luminance (lightness) greater than the threshold is detected and a polarity value p of "1" is recorded, indicating that the luminance (lightness) has changed in the brighter direction by more than the threshold, or a polarity value p of "0" is recorded, indicating that the luminance (lightness) has changed in the darker direction by more than the threshold; however, in the middle parts of the cells where white or black continues, there is no change in luminance (lightness), so no record is made.
[0066] In the above explanation, we have assumed that the black-and-white subject 4 (QR code) has only one cell that changes from white to black, but in an actual black-and-white subject 4 (QR code), it is normal for multiple white or black cells to be consecutive. Therefore, the number of pixels that detect the edge of the cells of the black-and-white subject 4 (QR code) is actually smaller.
[0067] This is extremely important in detecting a black-and-white subject 4 (QR code) from the photographed surface 40. In a black-and-white subject 4 (QR code), the cells are either white or black, with no intermediate colors, but the brightness (brightness) of other parts, such as the part on which the black-and-white subject 4 (QR code) is printed, changes randomly. Therefore, it is rare for white (brightness value 1) or black (brightness value 0) to be maintained for several milliseconds.
[0068] Taking the above technical matters into consideration, the image system 1 of the present disclosure will be described. As shown in Figs. 1 and 2, the event camera 2 captures a black and white subject 4 (QR code) to be captured. The black and white subject 4 (QR code) moves in a constant relative motion direction M at a speed of, for example, 10 centimeters per second. Of course, 1 to 10 centimeters per second is merely an example, and faster movement is possible. What is more important is not the physical speed of the black and white subject 4 (QR code), but the change in the viewing angle as seen from the event camera 2. If the distance between the event camera 2 and the black and white subject 4 is short, faster movement can be detected.
[0069] When the event camera 2 detects a change in luminance (brightness), it outputs event data D to the image restoration device 3. The event data D records the coordinates x, y of the pixel where the event occurred, the polarity value p (0, 1) where the change in luminance (brightness) equal to or greater than the threshold occurred, and the ignition time t (timestamp T) where the event occurred, as shown in Fig. 5 .
[0070] FIG. 1 shows hardware of the image restoration device 3, in which a memory 10 and a processor 12 are connected by a bus. FIG. 2 shows functional blocks of software of the image restoration device 3, which includes an initialization block 100, an update block 120, a correction block 140, and an output block 160. The event data D is recorded in the memory 10. FIG. 6 shows an example of recording the event data D shown in FIG. 5, in which the coordinates x, y of the pixel of the event camera 2, the polarity value p(0,1) at which a change in luminance (brightness) equal to or greater than a threshold value has occurred, and the firing time t (timestamp T) at which the event has occurred are recorded in the luminance array list L of the memory 10.
[0071] The initialization block 100 initializes the data in the memory 10. The initialization is to set the time stamp T to 0 at the coordinates x, y of all pixels in the event camera 2. If the resolution of the event camera 2 is, for example, 0.1 milliseconds, 0 indicates 0 milliseconds. The initialization is to set the brightness value I to an intermediate value m that is neither "0" nor "1" at the coordinates x, y of all pixels in the event camera 2. In this example, "0.5" is used as the intermediate value m. An example of the brightness array list L of the initialized memory 10 is shown in FIG. 7. At the coordinates x, y of all pixels in the event camera 2, the brightness value I is "0.5" and the time stamp T is "0". The operation performed in this initialization block 100 corresponds to step S101 in the flowchart of FIG. 12.
[0072] The update block 120 acquires event data D from the event camera 2 and overwrites (updates) the data in the memory 10. For example, when the event data D in Fig. 5 is acquired, the luminance array list L in the memory 10 is updated as shown in Fig. 8 when the time is 0.5 milliseconds, and is updated as shown in Fig. 6 when the time is 1 millisecond. Looking at the coordinates where the x coordinate is 2 and the y coordinate is Y-1, at the time of 0.5 milliseconds (Fig. 8), no firing has occurred yet, the luminance value I is "0.5", and the timestamp T is "0 milliseconds".
[0073] 5, 6, and 8, the events occur at the ends of the luminance array list L ((x=1, y=Y-1), (x=2, y=Y-1), (x=X, y=Y-1)), but this is due to the black-and-white subject 4 moving from the end of the field of view of the event camera 2. If the black-and-white subject 4 is a QR code, the QR code needs to be within the field of view of the event camera 2 by a predetermined amount or more in order to read the code.
[0074] In the example of Fig. 9, the ignition coordinates xf, yf are pixels shown in black (brightness value I: "0") or white (brightness value I: "1") in the figure. The operation performed in this update block 120 corresponds to step S102 in the flowchart of Fig. 12.
[0075] In order to quickly extract the black-and-white object 4 (QR code) from the event data D, the correction block 140 performs a second sub-correction process in addition to the first sub-correction process, which is the main process, to correct the brightness array list L of the memory 10 twice in total. As described above, the black-and-white object 4 (QR code) consists of only white cells and black cells, and has no intermediate colors, so the pixels of the event camera 2 detect the inversion of black and white at the edge of the cells, but do not detect the inversion of black and white at the parts other than the edge. And since the cells of the black-and-white object 4 (QR code) are printed as straight lines, the ignition coordinates xf, yf of the edges of the cells of the black-and-white object 4 (QR code) are white or black straight lines. In the example of FIG. 9, the black straight line and the white straight line are the ignition coordinates xf, yf. Therefore, in the first sub-correction process, the white straight line and the black straight line are detected from the ignition coordinates xf, yf.
[0076] In Fig. 9, the area below and to the lower left of the black vertical line and the lower black horizontal line of the firing coordinates xf,yf is white, but this white area only represents an image of the direction of movement of the black and white subject 4 (QR code) and does not actually represent the firing coordinates xf,yf. The shooting time varies depending on the number of pixels, the size of the cells of the black and white subject 4 (QR code), the direction M of relative movement, and the speed of the relative movement, but is set within a predetermined allowable time range. In the example of Fig. 9, the width of the white and black straight lines in the black and white subject 4 (QR code) corresponds to the predetermined allowable time range.
[0077] In FIG. 9, except for the white portion, the non-ignition coordinates xn,yn where no ignition occurs in the area other than the black-and-white subject 4 (QR code) are set as intermediate coordinates xm,ym with a brightness value I of "0.5". However, in reality, only the black-and-white subject 4 (QR code) does not move relatively, and the part on which the black-and-white subject 4 (QR code) is printed also moves relatively. Therefore, even in areas other than the black-and-white subject 4 (QR code), the position where an object such as a part moves usually has an ignition coordinate xf,yf. However, in areas other than the black-and-white subject 4 (QR code), the change in brightness (brightness) is random, and pixels that detect a change in brightness (brightness) in the bright or dark direction are not usually arranged in a straight line. In areas where no object moves, there is no change in brightness (brightness), so the brightness value I remains at the intermediate coordinates xm,ym with a brightness value of "0.5".
[0078] The above-mentioned first sub-correction process identifies the edge of the cell of the black-and-white subject 4 (QR code). The non-ignition coordinates xn,yn, which exist as intermediate coordinates xm,ym with a luminance value I of "0.5" within the range in which the black-and-white subject 4 (QR code) exists, are areas where black and white inversion does not occur, and are actually white or black in the QR code cell. The second sub-correction process of this example is a correction process that sets the intermediate coordinates xm,ym with a luminance value I of "0.5" to the activation coordinates xf,yf with a luminance value I of "1" or "0". The coordinates where the luminance value I changes from "1" to "0.5" in the relative motion direction M, or the coordinates where the luminance value I changes from "0" to "0.5" are set as the attention coordinates xc,yc, and the ignition coordinates xf,yf are set so that the same luminance value I is obtained from the attention coordinates xc,yc in the opposite direction O to the relative motion direction M.
[0079] For example, from the target coordinate xc, yc that follows the coordinate where the change in luminance (brightness) is in the dark direction and the black luminance value I "0" is fired, it is replaced with the same luminance value I "0" in the opposite direction O to the relative motion direction M. In the example of Figure 10, from the target coordinate xc, yc on the left side, gray is replaced with black in the opposite direction O to the relative motion direction M. Also, from the target coordinate xc, yc on the right side, gray is replaced with white in the opposite direction O to the relative motion direction M. As a result, the cells of the QR code are output as the original white or black.
[0080] FIG. 11 shows a black-and-white subject 4 (QR code) on which the second sub-correction process has been performed. As described above, the first sub-correction process, which is the main process, is a process for detecting the edge portions of the cells of the QR code, and is therefore not normally performed in positions where the black-and-white subject 4 (QR code) does not exist. In addition, the second sub-correction process is performed only in the portion determined by the first sub-correction process to be the area of the black-and-white subject 4 (QR code), and this second sub-correction process is also not performed in positions where the black-and-white subject 4 (QR code) does not exist. Therefore, in areas other than the black-and-white subject 4 (QR code) in FIG. 11 where objects such as parts move, the change in luminance (brightness) remains as it is, and white pixels (luminance value I is "1") and black pixels (luminance value I is "0") exist randomly.
[0081] However, to allow the black-and-white subject 4 (QR code) to be more accurately grasped within the field of view of the event camera 2, a process is performed to remove its random presence and display it in white, as shown in Fig. 11. Similarly, in areas where objects such as parts do not move, intermediate coordinates xm, ym with a brightness value I of "0.5" remain, but a process is performed to display the intermediate coordinates xm, ym of such areas in white as well. Note that the line extending to the lower left from the black-and-white subject 4 (QR code) in Fig. 11 simply indicates the relative movement direction M of the black-and-white subject 4 (QR code), and is not a line obtained by the second sub-correction process, nor does it indicate the shooting time.
[0082] The above-described first sub-correction process and second sub-correction process are performed in the correction block 140. The operation in this correction block 140 corresponds to step S103 in the flowchart of FIG.
[0083] The output block 160 outputs an image that has been subjected to the correction process shown in FIG. 11. As described above, in the area where the black-and-white subject 4 (QR code) exists, white cells and black cells are displayed. In the area where the black-and-white subject 4 (QR code) does not exist, white (luminance value I is "1") pixels and black (luminance value I is "0") pixels exist randomly, or the unchanged part is made white. In either case, since there is no intermediate coordinate xm, ym where the luminance value I is "0.5", the binary image B is output. The operation in this output block 160 corresponds to step S104 in the flowchart of FIG. 12. Note that, in the example of FIG. 11, the process of correcting the parts other than the black-and-white subject 4 (QR code) to white is performed, but the color may be black or another color such as green as long as it is easy to understand black and white.
[0084] After that, the information contained in the black-and-white subject 4 (QR code) is read from the output binary image B. Since the black-and-white subject 4 (QR code) has finding patterns 4a in three locations, it is easy to use software to detect the specially shaped finding pattern 4a from among the randomly present white (brightness value I is "1") and black (brightness value I is "0") pixels. Then, once the position of the finding pattern 4a is known, it is easy to calculate whether the brightness at the center position of the cell of the black-and-white subject 4 (QR code) is white (brightness value I is "1") or black (brightness value I is "0"), and the information of the black-and-white subject 4 (QR code) can be read out.
[0085] In particular, in the present disclosure, the first sub-correction process identifies the area where the black-and-white subject 4 (QR code) exists, and the second sub-correction process is performed in that area, so that the black-and-white subject 4 (QR code) can be restored before the entire black-and-white subject 4 (QR code) is actually read (after a minimum of two pixels are read). And, since the restored information is binary image B, there is no need to perform binarization again. Therefore, according to the present disclosure, information on the black-and-white subject 4 (QR code) can be read in an extremely short shooting time (minimum of one microsecond).
[0086] However, if a certain amount of time can be spent on identifying the black-and-white subject 4 (QR code), it is also possible to detect the cells of the black-and-white subject 4 (QR code) using only the first sub-correction process, without performing the second sub-correction process. That is, in the examples of Figures 9 and 10, the thickness of the line corresponds to the allowable time range, but by extending this allowable time range, it is possible to make the entire cells of the black-and-white subject 4 (QR code) white or black. In this sense, the first sub-correction process becomes the main process.
[0087] Second embodiment As shown in FIG. 13, the second embodiment is a modification of the first embodiment.
[0088] The image restoration flow according to the second embodiment executes S202 instead of S102. In S202, the update block 120 skips partial update processing of the luminance array list L according to the event data D for each event until the same event with the ignition coordinates xf, yf and polarity value p fires multiple times in succession. The partial update processing skipped at this time is an overwrite calculation using the polarity value p and the firing time t. Therefore, in the case of consecutive firings in which the same event with the ignition coordinates xf, yf and polarity value p fires multiple times in succession, the update block 120 overwrites the luminance value I of the ignition coordinates xf, yf in the luminance array list L with the same polarity value p. At the same time, in such consecutive firings, the update block 120 overwrites the timestamp T of the ignition coordinates xf, yf in the luminance array list L with the firing time t of the last event in the consecutive firings.
[0089] In S202, the number of consecutive events for which the update block 120 skips the update process is set to an appropriate number that can suppress erroneous overwriting of the polarity value p caused by noise firing such as disturbance. Also, the update process by the update block 120 in S202 is executed in the same manner as in the first embodiment, except for the overwriting calculation of the polarity value p and the firing time t. In such a second embodiment, S202 corresponds to the "update process".
[0090] (Action and effect) The effects of the second embodiment described above will be described below.
[0091] According to the second embodiment, the update of the luminance array list L is skipped until the same event with the ignition coordinates xf, yf and the polarity value p ignites multiple times in succession. This makes it possible to suppress poor restoration of the binary image B due to an overwrite error to the polarity value p caused by noise ignition.
[0092] The second embodiment will also be described from a different perspective. In the first embodiment, the change in luminance (brightness) at the edge of the black-and-white subject 4 (QR code) is mainly captured, and it is assumed that the area other than the edge is continuous white or black and does not change in luminance (brightness). This assumption is, of course, correct, but the occurrence of noise due to disturbance cannot be denied.
[0093] For example, in the white part of a cell of a black-and-white subject 4 (QR code), the possibility cannot be excluded that any pixel detects a drop in luminance (brightness) above a threshold due to changes in external light or dirt, and even if there is no change in light, external noise may be carried on the constant-voltage analog output signal from the event camera 2. In this case, a pixel that detects a drop in luminance (brightness) or has noise recorded in the event data D its coordinates x, y, polarity value p "0" as well as the firing time t (timestamp T). As a result, in the luminance array list L of the memory 10, the coordinates of the pixel become firing coordinates xf, yf, and the luminance value I also becomes "0".
[0094] However, the coordinates of such pixels should not have any change in luminance (brightness), and the white part of the cell of the black-and-white subject 4 (QR code) should continue, so they should be non-ignited coordinates xn,yn, and the luminance value I should be intermediate coordinates xm,ym indicating the intermediate value m of "0.5". When erroneous information like this is recorded in the luminance array list L of the memory 10, it is necessary to perform a filter process to remove noise in the first correction process and the second correction process in the correction block 140, which may increase the processing time or cause an erroneous judgment.
[0095] However, the possibility of such noise being detected multiple times in succession in the same pixel is low, because this is a place where the white part of the cell of the black-and-white subject 4 (QR code) should be continuous, not a place where the luminance (brightness) continues to decrease. On the other hand, at the edge of the cell of the black-and-white subject 4 (QR code), a certain pixel can detect multiple changes in luminance (brightness).
[0096] Therefore, a pixel with multiple consecutive changes in luminance (brightness) is likely to detect the edge of a cell of the black-and-white subject 4 (QR code). On the other hand, a pixel with a single change in luminance (brightness) is likely to mistakenly detect a luminance change that does not actually occur or be affected by external noise.
[0097] The second embodiment utilizes this characteristic. Even if a change in luminance (brightness) occurs at a specific pixel (specific coordinates), the luminance array list L in the memory 10 is not updated in the update block 120 unless the polarity value p in the same direction ("0" or "1") occurs multiple times in succession. This is step S202 in the flowchart of FIG. 13.
[0098] In this way, the luminance value I in the luminance array list L of the memory 10 is rewritten to "0" or "1" as a result of multiple consecutive events, so that the luminance array list L is highly reliable. Therefore, the correction block 140 can perform the first sub-correction process and the second sub-correction process using highly accurate information, and the filtering process can be eliminated or reduced. As a result, the processing time can be shortened and reading errors can be reduced.
[0099] The number of consecutive times is determined appropriately depending on the number of pixels of the event camera 2, the area of the photographed surface 40, the size of the cells of the black-and-white subject 4 (QR code), the moving speed of the black-and-white subject 4 (QR code) in the relative movement direction M, etc. For example, the number of consecutive times is preferably a number that allows sufficient detection of a luminance change due to the edge of the black-and-white subject 4 (QR code).
[0100] Although several embodiments have been described above, the present disclosure should not be construed as being limited to those embodiments, and can be applied to various embodiments and combinations within the scope not departing from the gist of the present disclosure.
[0101] The image restoration device 3 of the modified example may be a dedicated computer including at least one of a digital circuit and an analog circuit as a processor. Here, the digital circuit is at least one of ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array), SOC (System on a Chip), PGA (Programmable Gate Array), CPLD (Complex Programmable Logic Device), etc. Furthermore, such a digital circuit may include a memory that stores a program.
[0102] In a modified example, in the update process of the update block 120 and S102, the luminance value I of the non-ignition coordinate xn,yn in the luminance array list L may be maintained regardless of the time difference between the ignition time t and the time stamp T. In a modified example, the second sub-correction process of the correction block 140 and S103 may be skipped or always omitted as necessary.
[0103] In a modified example, the direction of the optical flow occurring during the shooting period due to the relative motion with respect to the event camera 2 may differ in a part of the surface 40 shot by the event camera 2. In this case, in the correction block 140 and the second sub-correction process of S103, for example, based on the relative motion direction M of the black-and-white subject 4 with respect to the event camera 2, an error in the luminance value I caused by a difference in the direction of a part of the optical flow may be corrected for the luminance array list L.
[0104] In a modified example, a black-and-white subject 4 other than a planar two-dimensional code that moves relative to the event camera 2 during a shooting period may be the subject of restoration of the binary image B. Specifically, the binary image B may be restored based on event data D output by the event camera 2 mounted on a moving body such as a vehicle, which captures an image of a black-and-white subject 4 that exists around the moving body. [Explanation of symbols]
[0105] 2 event camera, 3 image restoration device, 4 black and white object, 10 memory, 12 processor, 40 photographed surface, 100 initialization block, 120 update block, 140 correction block, 160 output block, B binary image, D event data, I intensity value, L intensity array list, S search direction, T timestamp, m intermediate value, p polarity value, t firing time, x,y pixel coordinates, xc,yc attention coordinates, xf,yf firing coordinates, xm,ym intermediate coordinates, xn,yn non-firing coordinates
Claims
1. An image restoration device (3) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that captures an image of a black-and-white subject (4) moving relatively within a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being output in association with an ignition time (t) of the event in which luminance has changed in at least one camera pixel, the image restoration device comprising: the monochrome subject is the binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and a cell edge portion is provided at a boundary between the white cells and the black cells; an initialization unit (100) for initializing the luminance value of each pixel coordinate to the intermediate value, which is darker than the white cell and brighter than the black cell, and different from the polarity value of the white cell and the polarity value of the black cell, in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update unit (120) that updates the luminance array list initialized by the initialization unit according to the pixel coordinates and the polarity value for each event; an output unit (160) that outputs the luminance array list updated by the update unit over the shooting period as the binary image; The update by the update unit overwrites the luminance value of the activation coordinate, which is the pixel coordinate where the event is activated in the luminance array list, with the polarity value of the event, while retaining the luminance values of the non-activation coordinate, which is the pixel coordinate excluding the activation coordinate in the luminance array list, detecting the edge portion of the cell based on the change from the intermediate value to the polarity value, and outputting the binary image based on the detected edge portion of the cell.
2. An image restoration device (3) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that captures an image of a black-and-white subject (4) moving relative to another during a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being output in association with an ignition time (t) of an event in which luminance has changed in at least one camera pixel, the image restoration device comprising: an initialization unit (100) for initializing a luminance value of each pixel coordinate to the intermediate value in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update unit (120) that updates the luminance array list initialized by the initialization unit according to the pixel coordinates and the polarity value for each event; an output unit (160) that outputs the luminance array list updated by the update unit over the shooting period as the binary image; The update by the update unit overwrites the luminance value of the ignition coordinate, which is the pixel coordinate where the event is fired, in the luminance array list with the polarity value of the event, while holding the luminance value of the non-ignition coordinate, which is the pixel coordinate excluding the ignition coordinate in the luminance array list; A correction unit (140) that corrects a luminance value of an intermediate coordinate, which is the pixel coordinate at which the intermediate value is stored, in the luminance array list updated by the update unit over the shooting period, The correction by the correction unit sets the relative movement direction (M) of the black-and-white subject with respect to the event camera as a search direction (S), searches for a coordinate of interest that is closest in the search direction from the intermediate coordinate to the pixel coordinates in which any of the polarity values are stored in the brightness array list, and overwrites the polarity value of the coordinate of interest on the brightness value of the intermediate coordinate in the brightness array list.
3. 3. The image restoration device according to claim 2, wherein the update by the update unit maintains the luminance value of the non-ignition coordinate in the luminance array list that has been switched from the ignition coordinate within an allowable time range from the ignition time of the coordinate before the switch, while overwriting the luminance value with the intermediate value outside the allowable time range from the ignition time of the coordinate before the switch.
4. 4. The image restoration device according to claim 1, wherein updating by the update unit is skipped until the event having the same ignition coordinates and the same polarity value ignites a plurality of times in succession.
5. The image restoration device according to any one of claims 1 to 4, which restores the binary image of the black-and-white subject in which the direction of optical flow generated during the shooting period due to relative motion with respect to the event camera is the same across the entire area of the surface (40) photographed by the event camera.
6. 6. The image restoration device according to claim 1, wherein the binary image is restored using a two-dimensional code that moves relative to the event camera during the shooting period as the black-and-white subject.
7. 1. An image restoration method executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity values (p) of an event output from an event camera (2) that captures a black-and-white object (4) moving relatively within a capture period, the pixel coordinates (x, y) and polarity values (p) of the event, which are output in association with an event time (t) at which an event in which luminance has changed in at least one camera pixel, the method comprising: the monochrome subject is the binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and a cell edge portion is provided at a boundary between the white cells and the black cells; an initialization process (S101) for initializing the luminance value of each pixel coordinate to the intermediate value, which is darker than the white cell and brighter than the black cell and different from the polarity value of the white cell and the polarity value of the black cell, in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update process (S102, S202) for updating the luminance array list initialized by the initialization process according to the pixel coordinates and the polarity value for each event; and an output process (S104) of outputting the luminance array list updated over the shooting period by the update process as the binary image, The updating process overwrites the luminance values of the firing coordinates, which are the pixel coordinates where the event is fired in the luminance array list, with the polarity value of the event, while retaining the luminance values of the non-firing coordinates, which are the pixel coordinates excluding the firing coordinates in the luminance array list, detecting the edge portions of the cells based on the change from the intermediate value to the polarity value, and outputting the binary image based on the detected edge portions of the cells.
8. An image restoration method executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that captures an image of a black-and-white subject (4) moving relative to one another during a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being output in association with an ignition time (t) of the event in which luminance has changed in at least one camera pixel, the method comprising: An initialization process (S101) for initializing a luminance value of each pixel coordinate to the intermediate value in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update process (S102, S202) for updating the luminance array list initialized by the initialization process according to the pixel coordinates and the polarity value for each event; and an output process (S104) of outputting the luminance array list updated over the shooting period by the update process as the binary image, The update by the update process overwrites the luminance value of the ignition coordinate, which is the pixel coordinate where the event is fired, in the luminance array list with the polarity value of the event, while retaining the luminance value of the non-ignition coordinate, which is the pixel coordinate excluding the ignition coordinate in the luminance array list; The method further includes a correction process (S103) for correcting a luminance value of an intermediate coordinate, which is the pixel coordinate at which the intermediate value is stored, in the luminance array list updated over the shooting period by the update process; The correction by the correction process is an image restoration method in which the relative movement direction (M) of the black-and-white subject with respect to the event camera is set as a search direction (S), a coordinate of interest that is closest in the search direction from the intermediate coordinate to the pixel coordinates in which any of the polarity values are stored in the brightness array list is searched for, and the polarity value of the coordinate of interest is overwritten on the brightness value of the intermediate coordinate in the brightness array list.
9. 9. The image restoration method according to claim 8, wherein the update by the update process maintains the luminance value of the non-ignition coordinate switched from the ignition coordinate in the luminance array list within an allowable time range from the ignition time of the coordinate before the switch, while overwriting and calculating with the intermediate value outside the allowable time range from the ignition time of the coordinate before the switch.
10. The image restoration method according to any one of claims 7 to 9, wherein the updating by the updating process (S202) is skipped until the event having the same ignition coordinates and the same polarity value ignites a plurality of times in succession.
11. An image restoration method as described in any one of claims 7 to 10, executed by the processor to restore the binary image of the black-and-white subject in which the direction of optical flow generated during the shooting period due to relative motion with respect to the event camera is the same throughout the entire surface (40) photographed by the event camera.
12. An image restoration method according to any one of claims 7 to 11, executed by the processor to restore the binary image using a two-dimensional code that moves relative to the event camera during the shooting period as the black-and-white subject.
13. An image restoration program stored in a storage medium (10) and including instructions to be executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that has captured an image of a black-and-white subject (4) moving relative to another object during a capture period, the pixel coordinates (x, y) and polarity value (p) of the event being associated with an ignition time (t) of the event in which luminance has changed in at least one camera pixel, the image restoration program comprising: the monochrome subject is the binary image in which white cells of a predetermined width and black cells of a predetermined width are arranged at predetermined positions, and a cell edge portion is provided at a boundary between the white cells and the black cells; The instruction: an initialization process (S101) for initializing the luminance value of each pixel coordinate to the intermediate value, which is darker than the white cell and brighter than the black cell and different from the polarity value of the white cell and the polarity value of the black cell, in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update process (S102, S202) for updating the luminance array list initialized by the initialization process according to the pixel coordinates and the polarity value for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update process as the binary image, The update by the update process overwrites and calculates the luminance values of the firing coordinates, which are the pixel coordinates where the event was fired in the luminance array list, with the polarity value of the event, while retaining the luminance values of the non-firing coordinates, which are the pixel coordinates excluding the firing coordinates in the luminance array list, detecting the edge portions of the cells based on the change from the intermediate value to the polarity value, and outputting the binary image based on the detected edge portions of the cells.
14. An image restoration program stored in a storage medium (10) and including instructions to be executed by a processor (12) for restoring a binary image (B) based on pixel coordinates (x, y) and polarity value (p) of an event output from an event camera (2) that photographs a black-and-white subject (4) moving relative to one another during a photographing period, the pixel coordinates (x, y) and polarity value (p) of the event being output in association with an ignition time (t) of the event in which luminance has changed in at least one camera pixel, the image restoration program comprising: The instruction: an initialization process (S101) for initializing the luminance value of each pixel coordinate to the intermediate value in a luminance array list (L) that stores one of the pair of polarity values and their intermediate value as a luminance value for each pixel coordinate; an update process (S102, S202) for updating the luminance array list initialized by the initialization process according to the pixel coordinates and the polarity value for each event; and an output process (S104) for outputting the luminance array list updated over the shooting period by the update process as the binary image, The update by the update process overwrites the luminance value of the ignition coordinate, which is the pixel coordinate where the event is fired, in the luminance array list with the polarity value of the event, while retaining the luminance value of the non-ignition coordinate, which is the pixel coordinate excluding the ignition coordinate in the luminance array list; The method further includes a correction process (S103) for correcting a luminance value of an intermediate coordinate, which is the pixel coordinate at which the intermediate value is stored, in the luminance array list updated over the shooting period by the update process; The correction by the correction process is an image restoration program that sets the relative movement direction (M) of the black-and-white subject with respect to the event camera as a search direction (S), searches for a target coordinate that is closest to the intermediate coordinate in the search direction among the pixel coordinates in which any of the polarity values are stored in the brightness array list, and overwrites the polarity value of the target coordinate to the brightness value of the intermediate coordinate in the brightness array list.
15. 15. The image restoration program according to claim 14, wherein the update by the update process maintains the luminance value of the non-ignition coordinate switched from the ignition coordinate in the luminance array list within an allowable time range from the ignition time of the coordinate before the switch, while overwriting and calculating the luminance value with the intermediate value outside the allowable time range from the ignition time of the coordinate before the switch.
16. 16. The image restoration program according to claim 13, wherein the updating by the updating process (S202) is skipped until the event having the same ignition coordinates and the same polarity value ignites a plurality of times in succession.
17. An image restoration program according to any one of claims 13 to 16, stored in the storage medium to restore the binary image of the black-and-white subject in which the direction of optical flow occurring during the shooting period due to relative motion with respect to the event camera is the same across the entire area of the surface (40) photographed by the event camera.
18. The image restoration program according to any one of claims 13 to 17, which is stored in the storage medium in order to restore the binary image using a two-dimensional code that moves relative to the event camera during the shooting period as the black-and-white subject.
Citation Information
Patent Citations
Method and device for eye tracking using event camera data
WO2019067731A1
