Disclosure of Invention
The invention provides a dynamic edge imaging method and device with embedded probability coding, which are used for solving the defect of delay in the process of pulsing image data in the prior art and improving the use experience of users.
The invention provides a dynamic edge imaging method with embedded probability coding, which comprises the following steps:
under the condition of acquiring an image to be processed, acquiring an electric signal corresponding to the image to be processed in real time;
the electric signal is subjected to gating and amplifying processing, and a current voltage is obtained based on the electric signal subjected to current gating and amplifying, wherein the current voltage is a voltage corresponding to a single pixel unit, and the current voltage comprises a plurality of corresponding pixel units which are different;
Acquiring a pulse signal based on a predetermined current reference voltage, a predetermined relation between a voltage to be compared and the current voltage, wherein the current reference voltage and the current voltage have a corresponding relation;
and generating an image to be identified based on the pulse signal and the pixel coordinates acquired in advance.
According to the dynamic edge imaging method with embedded probability codes, the voltage to be compared comprises a driving voltage and a divided voltage of a transistor, and the divided voltage is obtained based on a power supply voltage and a magnetic tunnel junction voltage;
the step of acquiring a pulse signal based on a predetermined current reference voltage, a predetermined relationship between a voltage to be compared and the current voltage, includes:
Determining whether the transistor is on based on characteristics of the transistor, the present voltage, and the driving voltage;
comparing the divided voltage with the current reference voltage with the transistor turned on;
Outputting a high level signal in case that the divided voltage is greater than the current reference voltage;
outputting a low level signal in case that the divided voltage is not greater than the current reference voltage;
Comparing the supply voltage with the current reference voltage if the transistor is not turned on;
outputting a high level signal in case that the supply voltage is greater than the current reference voltage;
and outputting a low level signal in case that the supply voltage is not greater than the current reference voltage.
According to the dynamic edge imaging method with embedded probability coding provided by the invention, before the step of acquiring the pulse signal based on the relation among the predetermined current reference voltage, the pre-acquired voltage to be compared and the current voltage, the method further comprises the following steps:
and under the condition that the electric signal meets the preset sampling condition, randomly sampling the electric signal to obtain the current reference voltage corresponding to the electric signal.
According to the dynamic edge imaging method with embedded probability coding provided by the invention, the step of randomly sampling the electric signal to obtain the current reference voltage corresponding to the electric signal comprises the following steps:
randomly sampling a preset number of electric signals from the electric signals to serve as sampled electric signals;
The current reference voltage is determined based on the intensity value of the sampled electrical signal.
According to the dynamic edge imaging method of the embedded probability coding, the electric signals are electric signals corresponding to a plurality of pixel units;
The step of gating and amplifying the electric signal and obtaining the current voltage based on the current gated and amplified electric signal comprises the following steps:
Selecting a corresponding electric signal from the electric signals according to a preset selection mode, and gating and amplifying the electric signals to obtain a voltage to be processed, wherein the preset selection mode comprises a row-by-row selection mode and a column-by-column selection mode;
And sequentially taking the voltage corresponding to each pixel unit included in the voltage to be processed as the current voltage.
According to the dynamic edge imaging method with embedded probability coding provided by the invention, the step of generating the image to be identified based on the pulse signal and the pixel coordinates acquired in advance comprises the following steps:
And converting the pulse signal into a digital signal, adding pixel coordinates corresponding to the digital signal, and generating an image to be recognized based on the digital signal added with the pixel coordinates.
According to the dynamic edge imaging method of embedded probability coding provided by the invention, the step of generating the image to be identified based on the digital signal added with pixel coordinates comprises the following steps:
And sequencing the digital signals added with the pixel coordinates to generate an image to be identified.
According to the dynamic edge imaging method of the embedded probability coding, after the step of generating the image to be identified, the method further comprises the following steps:
inputting the image to be identified into a pulse neural network which is trained in advance to carry out image identification, and obtaining an identification result.
The invention also provides a dynamic edge imaging device with embedded probability coding, which comprises:
the image acquisition unit is used for acquiring the electric signals corresponding to the image to be processed in real time under the condition of acquiring the image to be processed;
The gating and amplifying unit is used for gating and amplifying the electric signals and obtaining current voltage based on the electric signals subjected to current gating and amplifying, wherein the current voltage is voltage corresponding to a single pixel unit, and the current voltage comprises a plurality of corresponding pixel units which are different;
The pulse signal acquisition unit is used for acquiring a pulse signal based on a predetermined current reference voltage, a predetermined relationship between a voltage to be compared and the current voltage, wherein the current reference voltage and the current voltage have a corresponding relationship;
And the generating unit is used for generating an image to be identified based on the pulse signal and the pixel coordinates acquired in advance.
The invention provides a dynamic edge imaging device with embedded probability codes, which comprises a pulse signal acquisition unit, a pulse signal acquisition unit and a pulse signal acquisition unit, wherein the pulse signal acquisition unit comprises a transistor, a magnetic tunnel junction, a comparator and a power supply;
the current voltage is the input voltage of the grid electrode of the transistor, the drain electrode of the transistor is connected with one end of the magnetic tunnel junction, the other end of the magnetic tunnel junction is connected with the negative electrode of the power supply, the positive electrode of the power supply is connected with the source electrode of the transistor, the current reference voltage is the input voltage of the positive input end of the comparator, and the negative input end of the comparator is connected with the source electrode of the transistor;
the voltage to be compared comprises a driving voltage and a divided voltage of the transistor, wherein the divided voltage is obtained based on a power supply voltage and the magnetic tunnel junction voltage, and the power supply voltage is provided by the power supply;
and outputting a pulse signal through the comparator based on the relation among the current reference voltage, the voltage to be compared and the current voltage.
The invention provides a dynamic edge imaging method and a dynamic edge imaging device for embedded probability coding, which are characterized in that under the condition of acquiring an image to be processed, an electric signal corresponding to the image to be processed is acquired in real time, the electric signal is subjected to gating and amplifying processing, the current voltage is obtained based on the electric signal subjected to current gating and amplifying, wherein the current voltage is a voltage corresponding to a single pixel unit, the current voltage comprises a plurality of corresponding pixel units which are different, a pulse signal is acquired based on a predetermined current reference voltage, a predetermined relation between the voltage to be compared and the current voltage, the current reference voltage has a corresponding relation with the current voltage, and the image to be identified is generated based on the pulse signal and a predetermined pixel coordinate.
By the method, under the condition that the image to be processed can be acquired, the pulse signal is acquired based on the predetermined relation between the current reference voltage, the pre-acquired voltage to be compared and the current voltage, and the image to be identified is acquired based on the pulse signal, namely the pulsed image data can be acquired, so that the pulsed image data is acquired in the process of acquiring the image to be processed, the defect that delay exists in the process of pulsing the image data is overcome, and the use experience of a user can be improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to reduce delay caused by pulsing image data and improve user experience, the embodiment of the invention provides a dynamic edge imaging method and device of embedded probability coding, and the method for dynamic edge imaging of embedded probability coding provided by the embodiment of the invention is described below with reference to fig. 1:
As shown in fig. 1, an embodiment of the present invention provides a dynamic edge imaging method with embedded probability coding, where the method includes:
S101, under the condition of collecting an image to be processed, acquiring an electric signal corresponding to the image to be processed in real time.
In order to obtain the image to be processed, an image acquisition device may be used to acquire the image to be processed, where the image acquisition device may be a CMOS (Complementary Metal Oxide Semiconductor ) image sensor, and of course, other image sensors (pixel sensors) may be provided according to the actual use requirement, which is not specifically limited herein.
Because the image acquisition equipment has corresponding exposure time under the condition of acquiring the image to be processed, the electric signals corresponding to the image to be processed are not the same aiming at each time point in the exposure process. In other words, for each point in time when the image to be processed is acquired, the electrical signal (which may also be referred to as a pixel signal) corresponding to the image to be processed is different, and the electrical signal corresponding to each pixel unit included in the image to be processed is also different.
Therefore, in order to realize the pulsing processing of the image to be processed in the process of collecting the image to be processed, the electric signal corresponding to the image to be processed can be obtained in real time under the condition of collecting the image to be processed, wherein the electric signal is the electric signal corresponding to the pixel array.
Taking the image acquisition device as a CMOS image sensor as an example, the step S101 is described, in which, since the CMOS image sensor does not have color resolution capability, in order to be able to acquire an image to be processed, visible light may be filtered, so that three basic colors of red, green and blue are distinguished from pixel units corresponding to the CMOS image sensor, so as to obtain an electrical signal corresponding to the image to be processed in real time under the condition of acquiring the image to be processed, that is, to obtain an electrical signal corresponding to a pixel array, where the pixel array includes a plurality of pixel units.
In one embodiment, the CMOS image sensor may be compatible with color filter arrangements of common image formats, and thus, visible light may be filtered using a color filter arrangement (color filter), e.g., the color filter arrangement may be provided in front of the CMOS image sensor. Among them, common image formats may include Bayer, RGBE, RGBW, CYYM, CYGM, etc., which are reasonable and not particularly limited herein.
S102, gating and amplifying the electric signal, and obtaining the current voltage based on the electric signal after current gating and amplifying.
After the electric signal corresponding to a certain time point is collected, the preset voltage requirement cannot be met because the electric signal corresponding to the pixel unit is smaller, wherein the preset voltage requirement is the voltage requirement for subsequently obtaining the pulse signal.
Therefore, in order to facilitate subsequent acquisition of the pulse signal, the electrical signal can be subjected to gating and amplification processing, and a current voltage is obtained based on the current gating and amplified electrical signal, wherein the current voltage is a voltage corresponding to a single pixel unit, and the current voltage comprises a plurality of corresponding pixel units and is different.
In one embodiment, the electrical signal is an electrical signal corresponding to a plurality of pixel units, and after the electrical signal is obtained, the electrical signal corresponding to a preset number of pixel units can be selected for amplification so as to obtain the current voltage subsequently. Wherein the number of electrical signals of the selected pixel units is smaller than the number of electrical signals of the acquired pixel units.
In one embodiment, the step of gating and amplifying the electrical signal may be performed multiple times to traverse the electrical signal corresponding to each pixel unit included in the image to be processed. That is, the current gated and amplified electrical signal includes a plurality of signals, and each current gated and amplified electrical signal is different.
S103, acquiring a pulse signal based on a predetermined current reference voltage, a predetermined relation between a voltage to be compared and the current voltage.
After the current voltage is acquired, a pulse signal may be acquired based on a predetermined relationship between the current reference voltage, the pre-acquired voltage to be compared, and the current voltage. The current reference voltage and the current voltage have a corresponding relation, the current reference voltage is determined based on an image to be processed, and the voltage to be compared comprises a voltage determined based on a voltage corresponding to the magnetic tunnel junction. The pulse signal comprises a plurality of pixel units, and the corresponding pixel units exist in the pulse signal.
And S104, generating an image to be identified based on the pulse signal and the pixel coordinates acquired in advance.
After the pulse signals are acquired, the image to be identified, namely the pulsed image data, can be generated based on the pulse signals and the pixel units acquired in advance, so that the pulsed image data is acquired in the process of acquiring the image to be processed, the defect that delay exists in the process of pulsing the image data is overcome, and the use experience of a user can be improved.
As an implementation manner of the embodiment of the present invention, the voltage to be compared may include a driving voltage of the transistor and a divided voltage, where the divided voltage is a voltage obtained based on a supply voltage and a magnetic tunnel junction voltage.
The transistor may be an NMOS (NEGATIVE CHANNEL METAL Oxide Semiconductor, N-type metal oxide semiconductor) transistor or a PMOS (Positive CHANNEL METAL Oxide Semiconductor, P-type metal oxide semiconductor) transistor.
A magnetic tunnel junction (MTJ, magnetic Tunnel Junction) is a sandwich structure device that includes, from top to bottom, a reference layer, a tunneling barrier layer, and a free layer. The free layer and the fixed layer are two layers of magnetic films to form a nano magnet, and the insulating layer is an oxide film which is used as a tunneling barrier to isolate electron migration in the free layer and the fixed layer. By applying an external electromagnetic field control, the magnetic moment direction of the free layer can be switched to be either parallel or antiparallel to the pinned layer. If the magnetic tunnel junction is in a parallel state, the resistance of the magnetic tunnel junction is lower, and if the magnetic tunnel junction is in an antiparallel state, the resistance is higher, so that the difference of the resistance can be used as a logic state. When the tunneling barrier in the magnetic tunnel junction is low, random jump phenomenon occurs between the parallel state and the anti-parallel state due to thermal noise, and random output characteristics are generated.
The step of acquiring the pulse signal based on the predetermined current reference voltage, the predetermined relationship between the voltage to be compared and the current voltage may include:
based on characteristics of the transistor, the present voltage, and the driving voltage, it is determined whether the transistor is turned on.
In the case that the transistor is an NMOS transistor, if the present voltage is greater than the driving voltage, it is determined that the transistor is turned on, and if the present voltage is not greater than the driving voltage, it is determined that the transistor is not turned on.
In the case that the transistor is a PMOS transistor, if the current voltage is not greater than the driving voltage, it is determined that the transistor is turned on, and if the current voltage is greater than the driving voltage, it is determined that the transistor is not turned on.
Comparing the divided voltage with the current reference voltage with the transistor turned on.
In the case where it is determined that the transistor is turned on, the divided voltage and the current reference voltage may be compared to determine an output level signal later. In case that the divided voltage is greater than the current reference voltage, a high level signal is output. In the case where the divided voltage is not greater than the current reference voltage, a low level signal is output.
The supply voltage and the current reference voltage are compared with the transistor not turned on.
In the case where it is determined that the transistor is not on, the supply voltage and the current reference voltage may be compared to subsequently determine the output level signal. In case that the supply voltage is greater than the current reference voltage, a high level signal is output. In the case where the supply voltage is not greater than the current reference voltage, a low level signal is output.
It can be seen that in this embodiment, whether the transistor is turned on may be determined first, and the output level signal may be determined in different manners according to the turn-on condition of the transistor, so as to obtain the pulse signal.
As an implementation manner of the embodiment of the present invention, before the step of acquiring the pulse signal based on the predetermined current reference voltage, the pre-acquired voltage to be compared, and the relationship between the current voltage, the method may further include:
and under the condition that the electric signal meets the preset sampling condition, randomly sampling the electric signal to obtain the current reference voltage corresponding to the electric signal. The preset sampling condition can be a preset time condition and/or a preset exposure condition, and the preset time condition is that the time difference between the current time for collecting the electric signal and the time for carrying out random sampling last time is not less than a preset time.
The preset exposure condition is that the current time for collecting the electric signal is the exposure starting time. In the dynamic edge imaging method of the embedded probability coding provided by the embodiment of the invention, the image to be identified can be an image synthesized based on the process diagram to be identified corresponding to multiple exposure.
In the case where the current reference voltage is a voltage obtained based on a preset exposure condition, the step of generating the image to be identified based on the pulse signal and the pixel coordinates obtained in advance may include:
and generating a plurality of process images to be identified based on pulse signals corresponding to the current reference voltage and pixel coordinates acquired in advance according to each current reference voltage, and synthesizing the process images to be identified to obtain images to be identified.
For example, there are N exposures, specifically, a first exposure, a second exposure, and an N-th exposure, where the reference voltage corresponding to the first exposure is the current reference voltage 1, the image to be identified obtained based on the current reference voltage 1 is the process map to be identified 1, the reference voltage corresponding to the second exposure is the current reference voltage 2, the image to be identified obtained based on the current reference voltage 2 is the process map to be identified 2, & gt, the reference voltage corresponding to the N-th exposure is the current reference voltage N, the image to be identified obtained based on the current reference voltage N is the process map to be identified N, and the image to be identified a can be synthesized based on the process map to be identified 1, the process map to be identified 2, & gt, and the process map to be identified N.
In order to increase the generation speed of the image to be identified, multiple exposures may be used to correspond to a current reference voltage. For example, there are 8 exposures, specifically, a first exposure, a second exposure, an eighth exposure, the reference voltage corresponding to the first exposure-the fourth exposure is the current reference voltage 11, and the image to be recognized obtained based on the current reference voltage 11 is the process map 11 to be recognized, the process map 12 to be recognized, the process map 13 to be recognized, and the process map 14 to be recognized. The reference voltage corresponding to the fifth exposure-eighth exposure is the current reference voltage 12, and the image to be identified obtained based on the current reference voltage 12 is the process diagram to be identified 15, the process diagram to be identified 16, the process diagram to be identified 17, and the process diagram to be identified 18. Further, the image b to be recognized may be synthesized based on the process diagram 11 to be recognized, the process diagram 12 to be recognized, the process diagram 18 to be recognized.
In this embodiment, the electrical signal may be randomly sampled after each preset time period to obtain the corresponding current reference voltage, so that the frame rate of the image sensor may be improved. The electrical signal may also be randomly sampled after each exposure is performed so that the highest dynamic response may be obtained. The setting can be specifically performed according to actual use conditions.
Under the condition that the preset sampling condition is a preset time condition, that is, under the condition that the time difference between the current time of collecting the electric signal and the time of carrying out the random sampling last time is not less than the preset time, the electric signal can be randomly sampled to obtain the current reference voltage corresponding to the electric signal, wherein the preset time can be set according to the actual use requirement, for example, the preset time can be 1s, 50ms and 20ms, which are reasonable and are not particularly limited.
That is, random sampling is required every preset time period to obtain the current reference voltage, and for easier understanding, the correspondence between the current reference voltage and the electrical signal is described by way of example with reference to specific examples.
For example, the acquisition time of the electric signal a is the time point a, and the electric signal a is randomly sampled to obtain the current reference voltage a corresponding to the electric signal a. And acquiring the electric signals in real time until the time length between the current time (time point B) and the time point A meets the preset time length, randomly sampling the electric signals B corresponding to the time point B to obtain the current reference voltage B corresponding to the electric signals B, wherein between the electric signals A and B, electric signals corresponding to a plurality of time points exist, and the electric signals corresponding to the time points have corresponding relations with the current reference voltage A. That is, one current reference voltage corresponds to the electrical signals at a plurality of time points.
Because the electric signals corresponding to the images to be processed are different for each time point in the exposure process, in the embodiment, the electric signals can be randomly sampled under the condition that the electric signals meet the preset time condition, so that the current reference voltage corresponding to the electric signals is obtained, which is equivalent to updating the current reference voltage, and the current reference voltage is more accurate. In this way, in the process of generating the pulsed image data (the image to be identified), the pulse signal can be regulated and controlled through the more accurate current reference voltage, so that the more accurate pulsed image data can be obtained.
As an implementation manner of the embodiment of the present invention, the step of randomly sampling the electrical signal to obtain the current reference voltage corresponding to the electrical signal may include:
from the electrical signals, a preset number of electrical signals are randomly sampled as sampled electrical signals.
In order to enable the current reference voltage to characterize the global exposure characteristic of the electrical signal, a preset number of electrical signals can be randomly sampled as sampled electrical signals in the process of randomly sampling the electrical signals.
Wherein the preset number may be determined based on the number of pixel units. The value corresponding to the preset number is not less than 1% of the data corresponding to the pixel units. In other words, the number of pixel units corresponding to the sampled electrical signal is not less than 1% of the total number of pixel units.
For example, the size of the pixel array is 1024×1024, and for each row/column of the pixel array, electrical signals corresponding to 10 pixel units in the row/column can be randomly selected as sampling electrical signals.
The current reference voltage is determined based on the intensity value of the sampled electrical signal.
After the sampled electrical signal is obtained, the current reference voltage may be determined based on the intensity value of the sampled electrical signal, and in one embodiment, the intensity value of the sampled electrical signal may be counted, and a median value of the intensity value of the sampled electrical signal may be obtained as the current reference voltage. In another embodiment, the intensity value of the sampled electrical signal may be counted, and an average value of the intensity values of the sampled electrical signal may be obtained as the current reference voltage.
As an embodiment, a preset calibration ratio may be obtained, and after obtaining the median value of the intensity value of the sampled electrical signal or the average value of the intensity value of the sampled electrical signal, the median value of the intensity value of the sampled electrical signal may be amplified according to the calibration ratio, or the average value of the intensity value of the sampled electrical signal may be amplified according to the calibration ratio, so as to obtain the current reference voltage.
Therefore, in this embodiment, the current reference voltage capable of representing the global exposure characteristic corresponding to the electrical signal can be obtained, so that the pulse signal can be conveniently regulated and controlled by the more accurate current reference voltage, and more accurate pulsed image data can be obtained. In addition, in the embodiment, the current reference voltage is obtained by dynamically applying the probability sampling and statistics, so that the dynamic range of the image is improved.
As an implementation manner of the embodiment of the present invention, the electrical signal is an electrical signal corresponding to a plurality of pixel units. For example, the electrical signal may be an electrical signal corresponding to a pixel unit in a certain row in the pixel array, and the electrical signal may also be an electrical signal corresponding to a pixel unit in a certain column in the pixel array.
The step of performing gating and amplifying processing on the electrical signal and obtaining the current voltage based on the current gated and amplified electrical signal may include:
And selecting a corresponding electric signal from the electric signals according to a preset selection mode, gating and amplifying the electric signal to obtain the voltage to be processed. The preset selecting modes comprise a row-by-row selecting mode and a column-by-column selecting mode.
That is, after the electric signals are collected in real time, the corresponding electric signals can be selected from the electric signals in a row-by-row selection manner to be gated and amplified, so as to obtain the voltage to be processed, wherein the voltage to be processed is the voltage corresponding to a certain row of pixel units in the pixel array.
After the electric signals are collected in real time, the corresponding electric signals can be selected from the electric signals according to a column-by-column selection mode to be gated and amplified, and the voltage to be processed is obtained, wherein the voltage to be processed is the voltage corresponding to a certain column of pixel units in the pixel array.
The corresponding voltages to be processed can be obtained in a row-by-row selection mode, and then obtained in a column-by-column selection mode. The corresponding voltage to be processed can be obtained according to a column-by-column selection mode, and then the corresponding voltage to be processed can be obtained according to a row-by-row selection mode. This is reasonable.
And sequentially taking the voltage corresponding to each pixel unit included in the voltage to be processed as the current voltage.
After the voltage to be processed is obtained, that is, after the voltage corresponding to a certain column of pixel units in the pixel array or the voltage corresponding to a certain row of pixel units in the pixel array is obtained, the voltage corresponding to each pixel unit included in the voltage to be processed can be sequentially used as the current voltage.
That is, the current voltage is a voltage corresponding to a single pixel unit, and the current voltage includes a plurality of pixel units corresponding to each current voltage, that is, for a pixel unit in a certain row in the pixel array, the pixel units corresponding to different pixel coordinates correspond to different current voltages.
It can be seen that in this embodiment, the present voltage can be acquired for subsequent acquisition of pulsed image data.
As an implementation manner of the embodiment of the present invention, the step of generating the image to be identified based on the pulse signal and the pixel coordinates acquired in advance may include:
And converting the pulse signal into a digital signal, adding pixel coordinates corresponding to the digital signal, and generating an image to be recognized based on the digital signal added with the pixel coordinates.
In the case where the pulse signal is a high level signal, the high level signal may be represented by a digital 1, and in the case where the pulse signal is a low level signal, the low level signal may be represented by a digital 0, thereby realizing conversion of the pulse signal into digital information.
Since the digital signals have corresponding pixel units, pixel coordinates of the pixel units corresponding to the digital signals can be acquired, and for each digital signal, the pixel coordinates corresponding to the digital signal can be added to the digital signal.
In one embodiment, the pixel coordinates corresponding to the digital signal may be added before the digital signal, thereby implementing the addition of the pixel coordinates corresponding to the digital signal.
Further, after the pixel coordinates corresponding to the digital signal are added to the digital signal, an image to be recognized may be generated based on the digital signal after the pixel coordinates are added.
As an implementation manner of the embodiment of the present invention, the step of generating the image to be identified based on the digital signal added with the pixel coordinates may include:
And sequencing the digital signals added with the pixel coordinates to generate an image to be identified.
After the digital signals added with the pixel coordinates are obtained, the digital signals can be ordered according to the positions corresponding to the pixel coordinates, so that an image to be identified can be generated. In one embodiment, the pixel signals corresponding to each row of pixel units or each column of pixel units may be ordered so that an image to be identified may be generated.
As an implementation manner of the embodiment of the present invention, after the step of generating the image to be identified, the method may further include:
inputting the image to be identified into a pulse neural network which is trained in advance to carry out image identification, and obtaining an identification result.
In one embodiment, after the digital signal with the pixel coordinates added is obtained, the pixel signals corresponding to each row of pixel units or the pixel signals corresponding to each column of pixel units may be ordered, so that the pixel signals are transmitted to the impulse neural network in parallel according to the row order or the column order, so that the impulse neural network may perform image recognition, and an image recognition result is obtained.
In order to facilitate understanding of the dynamic edge imaging method of the embedded probability code provided by the embodiment of the present invention, the dynamic edge imaging method of the embedded probability code provided by the embodiment of the present invention is described below with reference to fig. 2 and 3:
as shown in fig. 2, fig. 2 is an example of an original image to be processed, that is, an image to be processed by using a dynamic edge imaging method with embedded probability coding provided by an embodiment of the present invention.
Fig. 2 is a gray scale diagram of an automobile running picture, which adopts 256 gray scales, and the image size is 900 pixels x700 pixels.
As shown in fig. 3, fig. 3 is an image to be identified, that is, an image example after the corresponding processing is completed by using the dynamic edge imaging method with embedded probability coding provided by the embodiment of the invention.
The main content of the automobile driving picture can be distinguished according to fig. 3, and the image size corresponding to fig. 3 is only 12.5% of that of fig. 2. That is, after the image is processed by the dynamic edge imaging method with embedded probability coding provided by the embodiment of the invention, the image recognition can be ensured, the recognition speed of the impulse neural network can be improved, and the use experience of a user is improved.
The embedded probability coding dynamic edge imaging device provided by the invention is described below, and the embedded probability coding dynamic edge imaging device described below and the embedded probability coding dynamic edge imaging method described above can be correspondingly referred to each other.
As shown in fig. 4, an embodiment of the present invention provides a dynamic edge imaging device with embedded probability coding, where the device includes:
An image acquisition unit 410, configured to acquire, in real time, an electrical signal corresponding to an image to be processed under the condition that the image to be processed is acquired;
The gating and amplifying unit 420 is configured to perform gating and amplifying processing on the electrical signal, and obtain a current voltage based on the electrical signal after current gating and amplifying, where the current voltage is a voltage corresponding to a single pixel unit, and the current voltage includes a plurality of corresponding pixel units that are different;
A pulse signal obtaining unit 430, configured to obtain a pulse signal based on a predetermined current reference voltage, a predetermined relationship between a voltage to be compared and the current voltage, where the current reference voltage and the current voltage have a corresponding relationship;
A generating unit 440, configured to generate an image to be identified based on the pulse signal and the pixel coordinates acquired in advance.
As shown in fig. 5, the pulse signal acquiring unit 430 may be a random circuit, which may include a transistor 510, a magnetic tunnel junction 520, a comparator 530, and a power supply (not numbered in the figure).
The current voltage is the input voltage of the gate of the transistor 510, the drain of the transistor 510 is connected to one end of the magnetic tunnel junction 520, the other end of the magnetic tunnel junction 520 is connected to the negative electrode (-VDD 1) of the power supply, the positive electrode of the power supply (VDD 1) is connected to the source of the transistor 510, the current reference voltage is the input voltage of the positive input terminal of the comparator 530, the negative input terminal of the comparator 530 is connected to the source of the transistor 510, and the negative input terminal of the comparator 530 is connected to the positive electrode of the power supply.
The voltage to be compared includes a driving voltage of the transistor 510 and a divided voltage, which is a voltage obtained based on a power supply voltage, which is a voltage supplied from a power supply, and the magnetic tunnel junction 520 voltage.
In fig. 5, the positive electrode of the power supply is connected to the source of the transistor 510 through a matching resistor. One end of the matching resistor is connected to the positive electrode of the power supply, the other end of the matching resistor is connected to the source electrode of the transistor 510, and the negative input end of the comparator 530 is connected to the other end of the matching resistor.
The matching resistor may function as a voltage divider together with the magnetic tunnel junction 520, that is, the divided voltage may be a voltage obtained based on the power supply voltage, the magnetic tunnel junction 520 voltage, and the matching resistor voltage. As one embodiment, the matching resistance is an adjustable resistance, and non-uniformities introduced in the fabrication process of the magnetic tunnel junction 520 can be eliminated by adjusting the resistance value of the matching resistance.
Based on the relationship of the present reference voltage, the voltage to be compared, and the present voltage, a pulse signal is output through the comparator 530.
The logic of the random circuit may be to determine whether the transistor 510 is turned on by determining based on characteristics of the transistor 510, the present voltage, and the driving voltage. The transistor 510 functions as a switch in a random circuit, and in particular, the transistor 510 may determine whether to be turned on according to a current voltage input to a gate of the transistor 510.
When the transistor 510 is turned on, the voltage input to the negative input terminal of the comparator 530 is a divided voltage, and the voltage input to the positive input terminal of the comparator 530 is a current reference voltage. The comparator 530 can compare the divided voltage with the current reference voltage.
The comparator 530 outputs a high level signal in case the divided voltage is greater than the current reference voltage, and the comparator 530 outputs a low level signal in case the divided voltage is not greater than the current reference voltage.
In the case that the transistor 510 is not turned on, the voltage input to the negative input terminal of the comparator 530 is the supply voltage, and the voltage input to the positive input terminal of the comparator 530 is the current reference voltage. The comparator 530 can compare the supply voltage with the current reference voltage.
The comparator 530 outputs a high level signal in case that the supply voltage is greater than the current reference voltage, and the comparator 530 outputs a low level signal in case that the supply voltage is not greater than the current reference voltage.
The random circuit is regulated by outputting a low level signal with a greater probability in the case that the current voltage input to the gate of the transistor 510 has a greater negative deviation than the current reference voltage, and outputting a high level signal with a greater probability in the case that the current voltage input to the gate of the transistor 510 has a greater positive deviation than the current reference voltage.
In one embodiment, the regulation of the random circuit may be achieved, where the probability of the random circuit outputting a high signal is 50% when the current voltage input to the gate of transistor 510 is equal to the current reference voltage.
The random circuit can still realize self-starting by means of the magnetic tunnel junction 520 under the condition of no external triggering, so that the problem of data dislocation caused by mismatching of triggering signals is thoroughly solved.
In the random circuit, the magnetic tunnel junction 520 is an unstable device composed of two nanomagnets, and can be compared with the current voltage input to the gate of the transistor 510, so that the random circuit can output a probabilistic pulse signal, which can be shown in fig. 6.
In fig. 6, when the input voltage of the random circuit is small, that is, when the current voltage input to the gate of the transistor 510 is small, the average value of the probabilistic pulse signals output from the random circuit is 0.22 (shown in fig. 6 (a)). When the current voltage input to the gate of the transistor 510 gradually increases, the average value of the probabilistic pulse signal output from the random circuit may rise from 0.22 to 0.49 (shown in fig. 6 (b)). In the case where the current voltage input to the gate of the transistor 510 continues to increase, the average value of the probabilistic pulse signal output from the random circuit may rise from 0.49 to 0.75 (shown in fig. 6 (c)).
In fig. 6, the values corresponding to the values in fig. 6 are the average values of the probabilistic pulse signals in the sampling time of 100 μs, and the ordinate of fig. 6 is the normalized value.
As an implementation of the embodiment of the present invention, the image acquisition unit 410 may include a color filter and an image acquisition device, where the color filter corresponds to a color filtering arrangement, and may be used to filter visible light (ambient light) into monochromatic light.
The image acquisition device may be an image sensor, and the CMOS image sensor can only respond to light intensity and cannot respond to color, so that a color filter may be set, so that an electrical signal corresponding to a pixel array of the image sensor and light intensity of monochromatic light form a positive correlation, so as to obtain an image to be identified later.
The image sensor can acquire signals of an image to be processed, and the pixel array corresponding to the image sensor can generate corresponding electric signals under the excitation of light. The image acquisition unit 410 is specifically configured to decompose visible light into monochromatic light through a color filter and enter a pixel unit of a pixel array corresponding to the image sensor, so that a photoelectric effect can occur and a corresponding electrical signal can be generated.
In the case that the image sensor is a cmos image sensor, the cmos image sensor has the capability of resolving each pixel unit, and the cmos image sensor can realize one-to-one correspondence between the electrical signal corresponding to each pixel unit and the pixel coordinate.
As an implementation manner of the embodiment of the present invention, before the acquiring the pulse signal based on the predetermined current reference voltage, the predetermined voltage to be compared, and the relationship between the current voltage, the apparatus may further include a sampling and averaging unit. Wherein the sampling and averaging unit may be a sampling and averaging unit.
The sampling and averaging unit is used for randomly sampling the electric signal under the condition that the electric signal meets the preset sampling condition to obtain the current reference voltage corresponding to the electric signal.
The sampling and averaging unit is specifically configured to randomly sample a preset number of electrical signals from the electrical signals, and determine the current reference voltage based on the intensity value of the sampled electrical signals.
As an implementation manner of the embodiment of the present invention, the electrical signal is an electrical signal corresponding to a plurality of pixel units.
The gate and amplification unit 420 may include a gate and an amplifier, wherein the number of channels of the amplifier is consistent with the arrangement of the pixel array.
And selecting corresponding electric signals from the electric signals through a gating device and an amplifier according to a preset selection mode to gate and amplify the electric signals, so as to obtain the voltage to be processed.
The preset selecting modes comprise a row-by-row selecting mode and a column-by-column selecting mode.
And sequentially taking the voltage corresponding to each pixel unit included in the voltage to be processed as the current voltage.
As one implementation of the embodiment of the present invention, the generating unit 440 may include a buffer and a calculating subunit, for example, the calculating subunit may be an FPGA (Field Programmable GATE ARRAY ) on which a pre-trained impulse neural network may be deployed.
And converting the pulse signal into a digital signal through a buffer and a calculating subunit, adding pixel coordinates corresponding to the digital signal into the digital signal, and generating an image to be identified based on the digital signal with the pixel coordinates added.
For example, in 40 clock cycles, the pulse signal is converted into digital signal by representing low level signal with digital 0 and high level signal with digital 1, and pixel coordinates corresponding to the digital signal are added before the digital signal, and row/column coordinates occupy 12 bits respectively to form a 64-bit data block. The row/column coordinates of the pixel units occupy 12 bits respectively, and can be compatible with most of the CMOS sensors at present.
As an implementation manner of the embodiment of the present invention, the calculating subunit is specifically configured to sort the digital signals after adding pixel coordinates, and generate an image to be identified.
As an implementation manner of the embodiment of the present invention, the computing subunit is further configured to, after generating the image to be identified, input the image to be identified to the pulse neural network after training in advance to perform image identification, so as to obtain an identification result.
As an implementation manner of the embodiment of the present invention, the dynamic edge imaging device with embedded probability coding may further include a sequential circuit unit and a position coding unit.
The time sequence circuit unit is used for providing time sequence signals for the position coding unit, the image acquisition equipment and the buffer memory, and the position coding unit is used for providing trigger signals for the gating device and the buffer memory. The position encoding unit may encode row/column information of the pixel array into the trigger signal based on the timing signal transmitted from the timing circuit unit.
For example, the image sensor includes a DxL pixel array, where D is the number of rows, L is the number of columns, and D and L are positive integers. The triggering frequency of the image sensor is f, and the triggering frequency of the position coding unit is not more than Dxf (corresponding to a row-by-row gating mode), or is not more than Lxf (corresponding to a column-by-column gating mode). The trigger frequency of the buffer is not lower than DxLxf.
In one embodiment, the position encoding unit may encode the row/column information of the pixel array into the number of high level signals or the number of low levels, and the gate may count the high level signals or the low level signals, so as to obtain the parameter information corresponding to the electrical signals corresponding to the pixel units needing to be gated and amplified, where the parameter information may correspond to the number of high level signals or the number of low levels.
Taking fig. 7 as an example, an embodiment of the present invention provides a dynamic edge imaging device with embedded probability coding, which is described below:
as shown in fig. 7, the dynamic edge imaging device with embedded probability coding according to the embodiment of the present invention includes a color filter 701, a pixel sensor 702, a gate 703, a sampling and averaging device 704, an amplifier 705, a position encoder 706, a timing circuit 707, a random circuit 708, a buffer 709, and a calculation module 710.
The color filter 701 is a color filter arrangement device, the pixel sensor 702 is an image sensor (image capturing device), the sampling and averaging unit 704 is a sampling and averaging unit, and the timing circuit 707 is a timing circuit unit.
The color filter 701 is connected to a pixel sensor 702, the pixel sensor 702 is connected to a timing circuit 707, the pixel sensor 702 is also connected to a sampling and averaging device 704, and the pixel sensor 702 is also connected to a gate 703.
The gate 703 is connected to an amplifier 705, and the amplifier 705 is connected to the gate of a transistor in the random circuit 708. The gate 703 is also connected to a position encoder 706, the position encoder 706 is connected to a timing circuit 707, and the position encoder 706 is also connected to a buffer 709.
The timing circuit 707 is further connected to a buffer 709, the buffer 709 is connected to the calculation module 710, the buffer 709 is further connected to an output of a comparator in the random circuit 708, and the output of the comparator in the random circuit 708 is connected to the sampling and averaging unit 704.
Therefore, the dynamic edge imaging device with embedded probability codes can integrate the acquisition of the image to be processed and the pulse conversion process of the image to be processed into the dynamic edge imaging device with embedded probability codes, and can complete the image identification work of the dynamic edge imaging device with embedded probability codes.
That is, the dynamic edge imaging device with embedded probability coding provided by the invention can adopt an edge combination scheme of sensing, coding and calculating to synchronously process the whole row/column of pixel information in a parallel mode, and can realize real-time and rapid identification of an image to be identified.
The dynamic edge imaging device with embedded probability codes can acquire pulsed image data, so that the pulsed image data is acquired in the process of acquiring an image to be processed, the defect that delay exists in the process of pulsing the image data is overcome, and the use experience of a user can be improved. For example, the dynamic edge imaging device with embedded probability codes provided by the invention can be suitable for scenes needing real-time identification such as automatic driving.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.