The present disclosure is directed to systems, methods and apparatuses for stereo vision, and in particular, to systems, methods and apparatuses for stereo vision which include a plurality of image sensors (e.g., cameras), as well as (in some embodiments) additional sensors.
Stereoscopic cameras provide a stereo view and are well known. For example, International Patent Publication no. WO2014154839 is understood to describe a camera system for capturing stereo data using two RGB cameras combined with a depth sensor for tracking the motion of an object (e.g., a person). The computations of the system are performed by a separate computer, which can lead to lag. Other examples include:
Embodiments of the present disclosure are directed to systems, methods and apparatuses for stereo vision, and in particular, to systems, methods and apparatuses for stereo vision which include a plurality of image sensors (e.g., cameras), as well as (in some embodiments) additional sensors.
According to at least some embodiments there is provided a stereo vision procurement apparatus for obtaining stereo visual data, comprising: a stereo RGB camera; a depth sensor; and an RGB-D fusion module, wherein: each of said stereo RGB camera and said depth sensor are configured to provide pixel data corresponding to a plurality of pixels, said RGB-D fusion module is configured to combine RGB pixel data from said stereo RGB camera and depth information pixel data from said depth sensor to form stereo visual pixel data (SVPD), and said RGB-D fusion module is implemented in an FPGA field-programmable gate array).
Optionally the apparatus further comprises a de-mosaicing module configured to perform a method comprising: averaging the RGB pixel data associated with a plurality of green pixels surrounding red and blue sites for R(B) at B-G(R-G) sites or R(B) at R-G(B-G) sites, and reducing a number of green pixel values from the RGB pixel data to fit a predetermined pixel array (e.g., a 5×5 window) for R(B) at B(R) sites.
Optionally said stereo RGB camera comprises a first camera and a second camera, each of said first and second cameras being associated with a clock on said FPGA, and said FPGA including a double clock sampler for synchronizing said clocks of said first and right cameras.
Optionally the apparatus further comprises a histogram module comprising a luminance calculator for determining a luminance level of at least said RGB pixel data; and a classifier for classifying said RGB pixel data according to said luminance level, wherein said luminance level is transmitted to said stereo RGB camera as feedback.
Optionally the apparatus further comprises a white balance module configured to apply a smoothed GW (gray world) algorithm to said RGB pixel data.
Optionally the apparatus further comprises a processor; and a biological sensor configured to provide biological data, wherein: said biological sensor is selected from the group consisting of: an EEG sensor, a heartrate sensor, an oxygen saturation sensor, an EKG sensor, or EMG sensor, and a combination thereof, the processor is configured to process the biological data to form a plurality of sub-features, said sub-features are combined by the FPGA to form a feature.
Optionally said FPGA is implemented as a field-programmable gate array (FPGA) comprising a system on a chip (SoC), including an operating system as a SOM (system on module).
Optionally the apparatus further comprises a CPU SOM for performing overflow operations from said FPGA.
Optionally the apparatus further comprises a processor; and a plurality of tracking devices to track movement of a subject, wherein: the processor is configured to process data from the tracking devices to form a plurality of sub-features, and said sub-features are combined by said FPGA to form a feature to track movements of the subject.
Optionally the tracking devices comprise a plurality of wearable sensors.
Optionally the apparatus further comprises a processor; and a multi-modal interaction device in communication with a subject, said multi-modal interaction device comprising said plurality of tracking devices and at least one haptic feedback device, wherein: the processor is configured to process data from the tracking devices to form a plurality of tracking sub-features, and said sub-features are combined by said FPGA to form a feature to track movements of the subject and to provide feedback through said at least one haptic feedback device.
Optionally the apparatus further comprises a processor configured to perform a defined set of operations in response to receiving a corresponding instruction selected from an instruction set of codes; and a memory; wherein: said defined set of operations including: a first set of codes for operating said RGB-D fusion module to synchronize RGB pixel data and depth pixel data, and for creating a disparity map; and a second set of codes for creating a point cloud from said disparity map and said depth pixel data.
Optionally said point cloud comprises a colorized point cloud.
Optionally the apparatus further comprises a memory; and a processor configured to perform a defined set of operations for performing any of the functionality recited in any of claims 1-11 in response to receiving a corresponding instruction selected from an instruction set of codes.
Optionally said processor is configured to operate according to a set of codes selected from the instruction set for a de-noising process for a CFA (color filter array) image according to a W-means process.
Optionally said computational device comprises a second set of codes selected from the instruction set for operating a bad pixel removal process.
According to at least some embodiments there is provided a system comprising the apparatus as described herein, further comprising a display for displaying stereo visual data.
Optionally the system further comprises an object attached to a body of a user; and an inertial sensor, wherein said object comprises an active marker, input from said object is processed to form a plurality of sub-features, and said sub-features are combined by the FPGA to form a feature.
Optionally the system further comprises a processor for operating a user application, wherein said RGB-D fusion module is further configured to output a colorized point cloud to said user application.
Optionally said processor is configured to transfer SVPD to said display without being passed to said user application, and said user application is additionally configured to provide additional information for said display that is combined by said FPGA with said SVPD for output to said display.
Optionally said biological sensor is configured to output data via radio-frequency (RF), and wherein: the system further comprises an RF receiver for receiving the data from said biological sensor, and said feature from said FPGA is transmitted to said user application.
Optionally the system further comprises at least one of a haptic or tactile feedback device, the device configured to provide at least one of haptic or tactile feedback, respectively, according to information provided by said user application.
According to at least some embodiments there is provided a stereo vision procurement system comprising: a first multi-modal interaction platform configurable to be in communication with one or more additional second multi-modal interaction platforms; a depth camera; a stereo RGB camera; and an RGB-D fusion chip; wherein: each of said stereo RGB camera and said depth camera are configured to provide pixel data corresponding to a plurality of pixels, the RGB-D fusion chip comprises a processor operative to execute a plurality of instructions to cause the chip to fuse said RGB pixel data and depth pixel data to form stereo visual pixel data.
Optionally the depth camera is configured to provide depth pixel data according to TOF (time of flight).
Optionally the stereo camera is configured to provide SVPD from at least one first and at least one second sensor.
Optionally the RGB-D fusion chip is configured to preprocess at least one of SVPD and depth pixel data so as to form a 3D point cloud with RGB pixel data associated therewith.
Optionally the fusion chip is further configured to form the 3D point cloud for tracking at least a portion of a body by at least the first multi-model interaction platform.
Optionally the system further comprises at least one of a display and a wearable haptic device, wherein at least the first multi-modal interaction platform is configured to output data to at least one of the display and the haptic device.
Optionally the system further comprises one or more interactive objects or tools configured to perform at least one of giving feedback, receiving feedback, and receiving instructions from at least one of the multi-modal interaction platforms.
Optionally the system further comprises one or more sensors configured to communicate with at least one of the multi-modal interaction platforms.
Optionally the one or more sensors include at least one of: a stereo vision AR (augmented reality) component configured to display an AR environment according to at least one of tracking data of a user and data received from the first multi-modal interaction platform, and a second additional multi-modal interaction platform; an object tracking sensor; a facial detection sensor configured to detect a human face, or emotions thereof; and a markerless tracking sensor in which an object is tracked without additional specific markers placed on it.
According to at least some embodiments there is provided a multi-model interaction platform system comprising: a multi-modal interaction platform; a plurality of wearable sensors each comprising an active marker configured to provide an active signal for being detected; an inertial sensor configured to provide an inertial signal comprising position and orientation information; at least one of a heart rate and oxygen saturation sensor, or a combination thereof; an EEG sensor; and at least one wearable haptic devices, including one or more of a tactile feedback device and a force feedback device.
According to at least some embodiments there is provided a method for processing image information comprising: receiving SVPD from a stereo camera; performing RGB preprocessing on the input pixel data to produce preprocessed RGB image pixel data; using the RGB preprocessed image pixel data in the operation of the stereo camera with respect to at least one of an autogain and an autoexposure algorithm; rectifying the SVPD so as to control artifacts caused by the lens of the camera; and calibrating the SVPD so as to prevent distortion of the stereo pixel input data by the lens of the stereo camera.
Optionally the method further comprises colorizing the preprocessed RGB image pixel data, and creating a disparity map based on the colorized, preprocessed RGB image pixel data.
Optionally calibration comprises matching the RGB pixel image data with depth pixel data.
Optionally the disparity map is created by: obtaining depth pixel data from at least one of the stereo pixel input data, the preprocessed RGB image pixel data, and depth pixel data from a depth sensor, and checking differences between stereo images.
Optionally said disparity map, plus depth pixel data from the depth sensor in the form of a calibrated depth map, is combined for the point cloud computation.
According to at least some embodiments there is provided an image depth processing method for depth processing of one or more images comprising: receiving TOF (time-of-flight) image data of an image from a TOF camera; creating at least one of a depth map or a level of illumination for each pixel from the TOF data; feeding the level of illumination into a low confidence pixel removal process comprising: comparing a distance that each pixel is reporting; correlating said distance of said each pixel to the illumination provided by said each pixel, removing any pixel upon the illumination provided by the pixel being outside a predetermined acceptable range such that the distance cannot be accurately determined; processing depth information to remove motion blur of the image, wherein motion blur is removed by removing artifacts at edges of moving objects in depth of the image; and applying at least one of temporal or spatial filters to the image data.
According to at least some embodiments there is provided a stereo image processing method comprising: receiving first data flow of at least one image from a first RGB camera and second data flow of at least one image from a second RGB camera; sending the first and second data flows to a frame synchronizer; and synchronizing, using the frame synchronizer, a first image frame from the first data flow and a second image frame from the second data flow such that time shift between the first image and frame and the second image frame is substantially eliminated.
Optionally sampling, before sending the first and second data flows to the frame synchronizer, the first and second data flows such that each of the first and second data flows are synchronized with a single clock; and detecting which data flow is advanced of the other, and directing the advanced data flow to a First Input First Output (FIFO), such that the data from the advanced flow is retained by the frame synchronizer until the other data flow reaches the frame synchronizer.
Optionally the method further comprises serializing frame data of the first and second data flows as a sequence of bytes.
Optionally the method further comprises detecting non-usable pixels.
Optionally the method further comprises constructing a set of color data from each of the first and second data flows.
Optionally the method further comprises color correcting each of the first and second data flows.
Optionally the method further comprises corresponding the first and second data flows into a CFA (color filter array) color image data; applying a denoising process for the CFA image data, the process comprising: grouping four (4) CFA colors to make a 4-color pixel for each pixel of the image data; comparing each 4-color pixel to neighboring 4-color pixels; attributing a weight to each neighbor pixel depending on its difference with the center 4-color pixel; and for each color, computing a weighted mean to generate the output 4-color pixel.
Optionally said denoising process further comprises performing a distance computation according to a Manhattan distance, computed between each color group neighbor and the center color group.
Optionally the method further comprises applying a bad pixel removal algorithm before said denoising process.
Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The materials, systems, apparatuses, methods, and examples provided herein are illustrative only and not intended to be limiting.
Implementation of the embodiments of the present disclosure include performing or completing tasks, steps, and functions, manually, automatically, or a combination thereof. Specifically, steps can be implemented by hardware or by software on an operating system, of a firmware, and/or a combination thereof. For example, as hardware, steps of at least some embodiments of the disclosure can be implemented as a chip or circuit (e.g., ASIC). As software, steps of at least some embodiments of the disclosure can be implemented as a number of software instructions being executed by a computer (e.g., a processor) using an operating system. Thus, in any case, selected steps of methods of at least some embodiments of the disclosure can be performed by a processor for executing a plurality of instructions.
Software (e.g., an application, computer instructions, code) which is configured to perform (or cause to be performed) certain functionality of some of the disclosed embodiments may also be referred to as a “module” for performing that functionality, and also may be referred to a “processor” for performing such functionality. Thus, processor, according to some embodiments, may be a hardware component, or, according to some embodiments, a software component.
Further to this end, in some embodiments, a processor may also be referred to as a module, and, in some embodiments, a processor may comprise one more modules. In some embodiments, a module may comprise computer instructions—which can be a set of instructions, an application, software, which are operable on a computational device (e.g., a processor) to cause the computational device to conduct and/or achieve one or more specific functionality. Furthermore, the phrase “abstraction layer” or “abstraction interface”, as used with some embodiments, can refer to computer instructions (which can be a set of instructions, an application, software) which are operable on a computational device (as noted, e.g., a processor) to cause the computational device to conduct and/or achieve one or more specific functionality. The abstraction layer may also be a circuit (e.g., an ASIC see above) to conduct and/or achieve one or more specific functionality. Thus, for some embodiments, and claims which correspond to such embodiments, the noted feature/functionality can be described/claimed in a number of ways (e.g., abstraction layer, computational device, processor, module, software, application, computer instructions, and the like).
Some embodiments are described with regard to a “computer”, a “computer network,” and/or a “computer operational on a computer network,” it is noted that any device featuring a processor (which may be referred to as “data processor”; “pre-processor” may also be referred to as “processor”) and the ability to execute one or more instructions may be described as a computer, a computational device, and a processor (e.g., see above), including but not limited to a personal computer (PC), a server, a cellular telephone, an IP telephone, a smart phone, a PDA (personal digital assistant), a thin client, a mobile communication device, a smart watch, head mounted display or other wearable that is able to communicate externally, a virtual or cloud based processor, a pager, and/or a similar device. Two or more of such devices in communication with each other may be a “computer network.”
Embodiments of the present disclosure are herein described, by way of example only, with reference to the accompanying drawings. With specific reference now to the drawings in detail, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of the preferred embodiments of inventions disclosed herein, and are presented in order to provide what is believed to be the most useful and readily understood description of the principles and conceptual aspects of various embodiments of the inventions disclosed herein.
RGB-D fusion chip 110 may optionally be implemented in a variety of ways, for example according to a RGB-D fusion module which may feature software, hardware, firmware or a combination thereof. The functions of RGB-D fusion chip 110 are described in greater detail with regard to
A plurality of additional functions may be provided through the components described herein, alone or in combination, with one or more additional sensors, provided through outputs from multi-modal interaction platform 102. For example, a stereo vision AR (augmented reality) component 118 can be provided to display an AR environment according to tracking data of the subject and other information received from multi-modal interaction platform 102. Such object tracking can be enabled by an object tracking output 120. Various tracking devices can support such tracking as described herein. Detection of a human face, optionally with detection of emotion, may be provided through such an output 122. Markerless tracking 124, in which an object is tracked without additional specific markers placed on it, may also be provided. Other applications are also possible.
Multi-modal interaction platform 102 is also shown as connected to a plurality of different wearable haptic devices 114, including one or more of a tactile feedback device 212 and a force feedback device 214. For example and without limitation, such wearable haptic devices 114 could include a glove with small motors on the tips of the fingers to provide tactile feedback or such a motor connected to an active marker.
Optionally, the camera calibration process is performed as follows. To perform all these steps, intrinsic and extrinsic parameters of the cameras are needed to know how they are positioned one to each other, to know their distortion, their focal length and so on. These parameters are often obtained from a calibration step. This calibration step optionally comprises taking several pictures of a chessboard pattern with the cameras and then computing the parameters by finding the pattern (of known size) inside the images.
From the intrinsic calibration process, the intrinsic parameters of each camera are extracted and may comprise the following:
Then, from the extrinsic calibration process, the position of one camera to the other can be extracted by having a 3×3 rotation matrix r and a 3×1 translation vector t.
In 310, stereo RGB images that have been preprocessed may then be processed for colorization and for creating a disparity map 316, such may then be fed to a colorized point cloud formation process 312. The process in 312 may be performed, for example, as described in the paper “Fusion of Terrestrial LiDAR Point Clouds with Color Imagery”, by Colin Axel, 2013, available from http://www.cis.rit.edu/DocumentLibrary/admin/uploads/CIS000202.PDF. However, optionally, determination of the sensor position and orientation may be dropped, since the stereo camera and depth sensor can both be calibrated, with their position and orientation known before processing begins. In addition, pixels from the RGB camera can be matched with pixels from the depth sensor, providing an additional layer of calibration. The colorized point cloud can then be output as the 3D point cloud with RGB data in 314.
Turning back to 310, the disparity map 316 is created in 312 by obtaining the depth information from the stereo RGB images and then checking the differences between stereo images. The disparity map 316, plus depth information from the depth sensor in the form of a calibrated depth map 328 (as described in greater detail below), is combined for the point cloud computation in 318, for a more robust data set.
Depth information from the depth sensor can be obtained as follows. Depth and illumination data is obtained in 320, from TOF (time of flight) camera 326. The depth and illumination data may then be processed along two paths, a first path for TOF control 322, which in turn feeds back to TOF camera 326 to control illumination and exposure time according to the illumination data. A second path for TOF calibration 324 can then be used to correct the TOF image, by applying the factory calibration, which in turn feeds corrected TOF depth data into the depth map 328. Calibration of the TOF function may be required to be certain that the depth sensor data is correct, relative to the function of the depth sensor itself. Such calibration increases the accuracy of depth map 328. Depth map 328 can then be fed into 318, as described above, to increase the accuracy of creating the colorized point cloud.
A histogram process 416, which enables autoexposure and autogain adjustments, is described in greater detail below.
After removal of low confidence pixels in 408, the depth processing can continue with motion blur removal in 410, which can remove artifacts at edges of moving objects in depth (i.e., removing the pixels involved). The application of temporal and spatial filters may be performed in 412, which are used to remove noise from the depth (spatial) and average data over time to remove noise (temporal). Spatial filters attenuate noise by reducing the variance among the neighborhood of a pixel, resulting in a smoother surface, but potentially at the cost of reduced contrast. Such a spatial filter may be implemented as a Gaussian filter for example, which uses a Gaussian weighting function, G(p−p′) to average the pixels, p′, within a square neighborhood, w, centered about the pixel, p.
Turning back to histogram process 416, the information obtained therefrom may also be passed to an exposure and illumination control process 418 as previously described, which is used to adjust the function of TOF camera 402.
While each incoming pixel (452) reaches the center of the moving window obtained in the buffer of the FPGA (field-programmable gate array), it is checked to determine if it was previously stored (in memory) as being defective (454). If not previously stored, the module proceeds to perform the candidate screening process (456) where the value of the pixel under test is compared toward surrounding neighbors average. If a certain threshold, TH_NEIGH, is exceeded, the inspected pixel is suspected to be defective, hence its data (value, position, neighbor average) are stored for further analysis.
A stored pixel is checked to determine whether it was previously labeled as defective (458), which leads to interpolation (460). If not previously labeled as defective, the pixel undergoes defect screening (462) by comparing its actual and previous values. A higher difference between these values as compared to the threshold TH_DIFF (to cancel effects of noise) corresponds to the pixel changing regularly, such that the pixel is no longer suspected as being defective. A time constant is incremented for each period of time that the pixel remains under suspicion of being defective. Another threshold, TH_FRAME, is defined and used to compare the value of the time constant. Once a pixel value (excluding noise) remains unchanged for a certain number of frames, such that the value of the time constant is equal to the second threshold of TH_FRAME, the pixel is determined to be defective. Now the interpolation step (460) becomes active, so that defective pixel is corrected before it slides toward first mask_2 memory cell. Interpolation may be performed by substituting an investigated pixel value with the average of its surrounding pixel. The average can be calculated among those pixels having the same filter color as the one in the center of the mask, which is discussed in more detail in reference to
Optionally one or more input sensors 504 are asynchronous sensors. As a non-limiting example, an asynchronous sensor implementation for a camera does not send data at a fixed frame rate. Instead, such a sensor would only send data when a change had been detected, thereby only sending the change data.
Data may then pass to an RGB-D fusion chip process 518, the operation of which was described with regard to
Next, data may pass to a layer of feature specific kernels 522, which receive data from RGB-D fusion chip process 518, sensor specific preprocess and control 520, and data sync and buffer 516. Feature specific kernels 522 may be operated according to the OPENCL standard, which supports communication between the FPGA and the CPU of the computational device operating user application 506 (not shown). Feature specific kernels 522 may also receive data directly from data sync and buffer 516, for example, to control the sensor acquisition and to provide feedback to data sync and buffer 516, to feed back to sensors 504.
Feature specific kernels 522, according to some embodiments, take data related to particular features of interest to be calculated, such as the previously described point cloud of 3D and RGB data, and calculate sub-features related to the feature. Non-limiting examples of such features may also include portions of processes as described herein, such as the de-mosaic process, color correction, white balance and the like. Each feature specific kernel 522 may have an associated buffer (not shown), which is preferably designed in order to provide a moving window. This allows data processing to be performed on a portion of a frame when data is serially sent.
Next, the sub-features can be passed to a plurality of fusion kernels 524, to fuse the sub-features into the actual features, such as the previously described point cloud of 3D and RGB data. Specific feature specific kernels 522 and fusion kernels 524 processes are described in greater detail below. Fusion kernel 524 can also report that a particular feature specific kernel 522 is missing information to the feature specific kernel that reports any missing information to sensors 504 through data sync and buffer 516. These features 526 may then be passed to user application 506 which may request specific features 526, for example, by enable specific fusion kernels 524, as needed for operation.
Among the advantages of calculation by feature specific kernels 522 and fusion kernels 524 according to some embodiments, is that both are implemented in the FPGA (field programmable array), and hence may be calculated very quickly. Both feature specific kernels 522 and fusion kernels 524 may be calculated by dedicated elements in the FPGA which can be specifically created or adjusted to operate very efficiently for these specific calculations. Even though features 526 may require intensive calculations, shifting such calculations, away from a computational device that operates user application 506 (not shown) and to the FPGA process 502, significantly increases the speed and efficiency of performing such calculations.
Optionally the layer of feature specific kernels 522 and/or the layer of fusion kernels 524 may be augmented or replaced by one or more neural networks. Such neural network(s) could be trained on sensor data and/or on the feature data from the layer of feature specific kernels 522.
Optionally, specific sub-features could be provided for analyzing biological data as described herein, for example from biological sensors as described herein. Analysis of biological data is well known in the art. For example, analysis of EEG data is known to include but not be limited to determining whether the data is of sufficiently high quality (for example having a sufficiently low impedance and/or not having excessive noise), analyzing the data for features as is known in the art, for example as sequences and/or according to the presentation of stimuli. Features could then be created from these sub-features for biological data.
Output from user application 506 can also be sent to user output controller 542, and then to output devices 530. Non-limiting examples of output devices 530 include a tactile feedback device 532, a display 534, a sound output device 536 and optionally other output devices 538. Display 534 can display visual information to the user, for example, as part of a head mounted device, for example for VR (virtual reality) and AR (augmented reality) applications. Similarly, other output devices 530 could provide feedback to the user, such as tactile feedback by tactile feedback device 532, as part of VR or AR applications.
A depth sensor 614 is shown as a ToF camera, in this non-limiting example implemented as a QVGA (Quarter Video Graphics Array) camera operating at 60 fps, which communicates with the FPGA according to parallel communication. Audio input may be obtained from a stereo microphone 616 as shown. An inertial sensor 618 may be used to obtain position and orientation data. A radio-frequency (RF) receiver 620 may be used to collect data from other external sensors, which may be worn by the user for example, such as a biological sensor 622 and an AM (active marker) sensor 624, as previously described.
A sensor config 646 optionally receives configuration information from stereo camera 609 and depth sensor 614, for example, to perform the previously described synchronization and calibration of
Inertial sensor 618 may communicate with FPGA 626 according to the I2C (Inter Integrated Circuit) protocol, so FPGA 626 includes an I2C port 634. Similarly, RF receiver 620 may communicate with FPGA 626 according to the UART (universal asynchronous receiver/transmitter) protocol, so FPGA 626 features a UART port 636. For outputs, FPGA 626 can include one and/or another of a MIPI port 638, a USB port 640, an Ethernet port 642 and a data transceiver 644.
Turning now to
Also shown in
A frame serializer 708 serializes the frame data as a sequence of bytes and the serialized data is passed to a stereo detect module 714, which performs the previously described “bad” or non-usable pixel detection. The data then undergoes a de-mosaic process 716, which is described in greater detail below and which involves constructing a complete set of color data from the incomplete color samples obtained previously. Thereafter, the data may then pass to a CCM (color correction matrix) process 718, described in greater detail below, which corrects deficiencies in the color data. Thereafter, the data may be adjusted for white balance in a white balance process 722, also described in greater detail below, and thereafter, can undergo a frame deserialization process 724 to restore the frame structure of the data.
Data from CCM process 718 can then be passed to a histogram process 720, which enables autoexposure and/or autogain adjustments (see below). Histogram data may be sent to an MCU 710, which performs any necessary adjustments to histogram process 720. MCU 710 also sends feedback to left RGB camera 702 and right RGB camera 704, to adjust their function according to the histogram data.
As shown in
Master 802 may be implemented by using, for example, the Lattice Semiconductors™ product, in which case the GPIO (General Purpose Input Output) core is implemented for slave units 804. Bus 800 may be implemented according to the Wishbone protocol, which is an open source interconnect architecture maintained by OpenCores organization (https://opencores.org/opencores,wishbone).
Configurable parameters can be sent to custom cores by means of the hardware implemented processor, e.g., LatticeMico32™ as master 802, which is based on a 32-bit Harvard RISC architecture and the open bus WISHBONE. For communication within MCU 710, such communication always occurs between a MASTER interface and a SLAVE interface. In some embodiments, only MASTER unit 802 can begin communications. Master unit 802 performs a handshake with slave 804 through bus 800, after which communication can occur.
The moving windows can comprise data registers 1152, which allows moving mask to have all cells accessible at same time. The remaining part of each line may be realized with EBRs 1154, which behave as FIFO registers. Each EBR 1154 preferably comprise 18 Kbit RAM. According to available memory configuration, this buffer is capable of handling a frame having maximum width of 2053 pixels (2 EBRs 1154 per line are adopted in configuration 1024×18). In order to maintain original synchronization, FV and LV signals entering in the buffer have to be properly delayed at output. In some embodiments, the first entering pixel through pix_in input comes out from pix_TEST after about 2 frame lines (see
The operation of the de-mosaic module (described below), but briefly a set of formulas are given below.
G values in R(B) sites,
R(B) in RG(BG) rows at G sites,
The remaining classification is classification c, in which the number of green pixel values is reduced to fit in a 5×5 window in 1310, and matrix C is applied as the convolution matrix in 1312. This classification is applied for R(B) at B(R) sites, which are the remaining cases. The method as performed on the pixels is shown in
Process 1354 features a truncation mechanism, in the last calculation phase: a vector 1356 containing the summation resulting from operation performed on numerator of one of the above equations for de-mosaicing, which is right shifted. The control may be performed on the most left bits 1358 just before final color value begins. First, it is determined whether the bits are all equal to zero, so as to ensure that the result is on the correct range. 2's complement convention is used for negative number representation and, therefore, if first bit is 1 the final value will be set to 0 (as a negative color value does not make sense). On the other hand, if the first bit is null, but the other bits preceding the final result interval are not all zero, then the result will be an overflow. In this case, the result of check bits 1358 will be truncated to 4095 (if 12 bits format is used). The final color value is shown in 1360, while suppressed bits are shown in 1362.
The smoothed GW algorithm was implemented according to the following equations:
Per channel frame average can be obtained by using a DSP adder in self-accumulation configuration (as shown), which can be activated only when both synchronization signals (FV_whb and LV_whb) are in high logic state, so that only valid pixel values are added. Obtained summation can then be divided by total number of pixels composing a frame. Co-efficients nav and aav are chosen by running a function in Scilab called nAvMinErr( ), or a similar computation, which need the number of bits to represent a pixel and the resolution of used camera. Averages are calculated on corrected channels, in order to have a feedback on the effect of last values assumed by coefficients. Each coefficient is initialized to 1 in order to directly estimate real image situation. A state machine can be implemented as to adjust multiplying coefficients during vertical blanking time intervals (FV_whb at logic ‘0’), its associated time diagram being depicted in
The adjustment of coefficients, according to which the R and B channels are multiplied, requires few clock cycles, and it is performed at the end of a frame, right after FV_whb goes to logic ‘0’. Here two states follow one another: AV_CALC causes finalization of the calculation of averages, UPDATE allows the update of both coefficients. Comparison of averages B and R toward G can be done in parallel. During remaining time, state machine stays in W_L_FV or W_H_FV states in order to catch the end and the beginning of a frame.
Multiplication of R and B channels can be performed converting to fixed point convention (multiplication by 2nres, with nres number of fractional digits) followed by integer part selection, by taking off fractional digits (right shift). The minimum possible step increment may be 0.001, preferably up to and including 0.01). The closest resolution obtainable is 0.000977 using nres=10. To ensure a good range, the integer part is fixed to two bits (3 is the maximum integer part can be represented). Moreover, as the adjustment can be both an increment or a decrease, an additional bit for 2's complement representation is needed. Hence ampl_step input is 10 bits wide.
A classification module 1504 classifies each pixel according to a different range of luminances, as the histogram is configured to show a set of ranges of such luminances. The histogram application therefore involves the classification of each pixel according to its relevant luminance range. The classified pixel may then be stored in a memory 1506, from which the data may be retrieved for use in other procedures. To permit both the FPGA (not shown) and MCU 710 to access the luminance data, a pseudo dual port RAM may be used to updates the luminance data (not shown).
As shown, a method 1600 begins in stage 1602 with computing the projection of the rectified image on the aligned camera reference frame through the new camera matrix computed with the intrinsic parameters (focal length and principal point) and the extrinsic parameters (rotation matrix and translation vector).
Let Pose be a matrix resulting from the computation of a matrix composed of the intrinsic camera parameters and of a matrix composed from the rotation and the translation matrixes between the 2 cameras. Thus, the projection is:
From this point, the pixel coordinates of the projection of the r and c pixel coordinates on the new coordinates system become:
Stage 1604 includes correcting the distortion of the lenses of the cameras with their distortion parameters.
With q2=rnew2+cnew2, the radial distortion is taken in account in this way:
The tangential distortion is taken in account in this way:
Finally, the undistorted pixel coordinates are the sum of the radial and the tangential distortion computations:
Stage 1606 includes projecting the undistorted pixel coordinates on the real camera reference frame using the KK camera matrix. This matrix is defined as follows:
Thus, the final pixel coordinates are:
Mapper 1702 is in charge of executing the rectification algorithm and generating the rectified pixel coordinates. The operation of mapper 1702 is described in more detail in
The purpose of the Memory Management Unit 1704, in some embodiments, is to first store the incoming raw pixels, and second, to output the pixels corresponding to the rectified pixels coordinates given by the Mapper 1702. The operation of Memory Management Unit 1704 is described in more detail in
The Bilinear Interpolator 1706 may be used to compute the bilinear interpolation of four pixels. The rectified pixel coordinates aim at four pixels as they are non-integer. A strategy to retrieve a value for the rectified pixel could be to choose one pixel among these four but to be as accurate as possible, a better strategy is to compute the bilinear interpolation of these four pixel values according the relative position of the rectified pixel among these four pixels. The following equation describes this operation:
Hence, this block takes as inputs the four pixel values pointing by the rectified coordinates as well as the fractional parts of these rectified coordinates and outputs the pixel value out the rectified pixel as their bilinear interpolation.
A finite-state machine 1708 may be used to control the block(s) according to, for example, an imposed 1280*720p@60 fps protocol (the Line Valid and Frame Valid signals define this protocol).
At the beginning of a sequence, the state machine (shown as reference number 1750 in
With respect to
In order to avoid data corruption, the buffering process can use a “ping-pong” scheme so that while data is being written in one buffer, and data can be read into the other buffer. A change of buffer can occur every time the writing process reaches the end of a buffer. With this scheme, the architecture starts filling one buffer as soon as it receives the first pixels of an image (indicated by the FV and LV signals) and waits for this buffer to be full before starting to rectify the first pixel's coordinates and allow the reading process to read in this buffer. A small delay may be therefore added at the launching of the architecture, but then the latter may be able to output pixels at the requested frame rate.
As the rectified pixel's coordinates are non-integer, and as four pixels from the unrectified image are needed at the same time to interpolate the intensity of one rectified pixel, four dual-port memories can be used in each buffer so that four pixels at the same clock cycle may be output when requested. To insure that the 4 adjacent pixels targeted by the non-integer pixel coordinates are situated in different dual-port memories, pixels may be simply cyclically stored in the 4 memories following the row order.
An illustrative example of how this operates is shown in
If the pixel coordinates couple requested by the Mapper is the green point on the image (shown in
The writing process may be managed by the Writing Controller which can generate the writing addresses of the four memories and cyclically activates their write enable signals while skipping the addresses that need to be to fit with the padding process. A demultiplexer may then be used to redirect the write enable signals to the right buffer (the one that is currently in the writing process).
The reading process is managed by the Coord2memAddr_converter, which may be used to turn pixel coordinates couples coming from the Mapper into reading memory addresses for the Bilinear Interpolator (BI)—the four pixel's values required to compute the rectified pixel value. The BI is facilitated by cyclically storing the pixels because, from a pixel coordinates couple, the BI need merely compute the linear address, and then divide it by 4 (for example). This calculus is described below:
Based upon
As shown, p8 that is in m3 is at the linear address 1, p9 in m0 is at linear address 2, and p26 and p27 both are at linear address 6 in m1 and m2 respectively. In this architecture, using the padding process, Image Width is replaced by the width of the padded image, 1290 in the present case, so that the memory addresses skipped by the Writing Controller during the writing process may the never be achieved.
Also, in order to know which memory corresponds to which linear address, a modulo 4 operation may be computed on the column number (c_p_i). This information may also benefit the Router block that matches the incoming pixels value from m0, m1, m2 and m3, with their position in the image (which may be important for the bilinear interpolation).
The linear addresses computed with the above equations may comprise absolute addresses (according to some embodiments). Indeed, in some embodiments, the processes work for buffer size being the same as an entire image. However, since the buffer size may comprise several lines, the Coord2memAddr_converter requires the identification of the line which is currently stored at the beginning of the buffer, so that the linear absolute addresses may be processed into relative addresses. Such information may be provided by the Writing Controller through a first_row signal. Thus, the process, in some embodiments, should take this into account by, for example, subtracting the numerator by this signal.
Step 1: Matching Cost Computation. In this step, the similarity of pixels in left and right image are measured by producing a cost. Various non-limiting, exemplary algorithms are described below.
Absolute Differences (AD)
AD(x, y, d)=|L(x, y)−R(x−d, y)|
This algorithm can be used to compute the absolute difference of a pixel in the left image and a pixel in the right image on the same row, and with an offset in the column index (corresponding to the disparity). It has a low complexity due to its simplicity but does not produce smooth disparity map for highly textured images.
Squared Differences (SD)
SD(x, y, d)=(L(x, y)−R(x−d, y))2
This algorithm is very similar to the Absolute Differences by its definition and by its results in term of speed and accuracy. It also can be used to compute the difference of the intensity of a pixel in the left image and a pixel in the right image and then elevates it to the power of 2. AD and SD produce almost the same disparity maps.
Sum of Absolute Differences (SAD)
This algorithm gathers data as in step 1 and step 2 of the taxonomy (above), in one step. Indeed, this algorithm is the same as the AD, it operates on a square window around the pixel of interest. Therefore, it has a bigger computational time than the AD, but it smooths the disparity map produced due to the window-based method which acts like a filter and it decreases the error rate of the disparity map produced by better finding some occluded disparities.
Sum of Squared Differences (SSD)
The SSD is to the SD, as the SAD is to the AD. Again, the SAD and the SSD are very similar and produce almost the same disparity maps.
Normalized Cross Correlation (NCC)
If an algorithm that computes the disparity based on the intensity of the pixels in the images is used with images that come from cameras that do not have the same gain and/or bias, the produced disparity map can be incorrect. Thus, to compensate for differences in gain and/or bias, the normalized cross correlation algorithm can be applied. It normalizes the intensity of the pixels from the left and the right images so that a difference in gain and/or bias does not come into account anymore. Accordingly, this algorithm may be required if the cameras do not have the same gain/bias, but it can blur regions of discontinuity and also requires considerable computational resources to obtain a high-accuracy disparity map.
CensusTransform (CT)
CT(x, y, d)=Hamming(CensusL(x, y), CensusR(x−d, y))
With:
Census(x, y)=bitstringU,flow(l(i, j)≥l(x, y))
This algorithm is based on the Census transform and it computes a bitstring based on a square window centered on the pixel of interest and where each bit of this bitstring is the result of the comparison between the intensity of a pixel inside the window and the intensity of the pixel of interest. The Hamming distance between the Census transform computed in the left image and the Census transform computed in the right image is performed and considered, but may be at a cost. This algorithm is robust to disparity discontinuities and it can show very high matching quality at object borders. However, in some embodiments, it may produce incorrect matching in regions with repetitive structures.
Mini-Census Transform (miniCT)
This algorithm is similar to the Census transform, although it operates on a different window. In the mini-Census transform, the bitstring is not computed on a square window, but rather, on a cross-centered window on the pixel of interest. The resulting bitstring is 6 bits long (2 bits up and 2 bits down the pixel of interest and 1 pixel left with an offset of 1 and 1 pixel right with an offset of 1). This cross with an example of the application of the algorithm is shown in
Step 2: Cost Aggregation
From step 1, a 3-D costs map is produced. Indeed, for each pixel in the image, a cost is computed for each disparity (shift between the 2 images). But these costs can be considered as raw (except for some algorithms) since they are computed with local information. In order to minimize the matching uncertainties, the step 2 aggregates the raw costs according to several possible schemes.
Furthermore, only local methods will be described here as global methods often skip this step. Local methods are window-based methods and the disparity of each pixel depends only on the intensity values of the surroundings pixels within the predefined window. Hence, as this method takes in account only local information, it has a low computational complexity and a short run time so that architectures implementing it can be real-time (sometimes using additional hardware). Finally, local methods use all 4 steps of the process.
Global methods are, in contrast, methods that generate a disparity map that optimizes a global energy function. This global energy function contains mainly 2 terms. One penalizes disparity variations and the other measures the pixel similarity. Global methods have a high computational complexity and a longer run time than local methods. By the way, software-based global methods are almost impossible to be implemented in a real-time architecture so additional hardware would be needed to address this constraint. Another difference with local methods is that global methods usually skip step 2 of the 4-step process.
Turning back to cost aggregation, these methods aggregate the matching cost by summing them over a support region which is usually a square window centered on the current pixel of interest. The simplest aggregation method is to apply a low-pass filter in the square support window. This window can be fixed-size (FW) but the error rate increases when the size of this window becomes too big and the parameters must fit the particular input dataset. Or this window can also be adaptive (AW), in terms of size, or in terms of weight: adaptive support weight (ASW), or there can be multiple windows (MW). The MW technique shows weaknesses at objects' boundaries but the AW technique reduces the errors caused by boundary problems. AW can achieve high quality results near depth discontinuities and in homogenous regions. The ASW technique first computes for each pixel an adaptive cross based on its intensity similarity to its consecutive neighbours in the four directions. Then the adaptive support weight window on which the raw costs will be summed over is created by merging the horizontal arms of the cross of its vertical neighbours.
This technique is said to produce quality results of the generated disparity map but may be more time consuming than the fixed-size (FW) technique for instance.
Step 3: Disparity Selection
Now that the costs are aggregated and that the matching uncertainties have been addressed, it is time to go from this 3-D aggregated costs map to a 2-D disparity map. In other words, it is time to find for each pixel the correct disparity among all the disparities that were used to build this 3-D costs map.
As local and global methods exist for this step, both will be described briefly.
For the local methods, the most used disparity selection method is a Winner Takes All (WTA) strategy so that the disparity d(x,y) for each pixel corresponds to the minimum aggregated cost in the range of the aggregated cost obtained after step 2 (or step 1 if step 2 skipped) over all allowed disparities (D):
This method works for the algorithms described in step 1, except for the normalized cross correlation (NCC) where the Winner Takes All method consists of choosing the disparity that corresponds to the maximum aggregated cost.
For global methods, a global energy function may be used:
E(d)=Edata(d)+β, Exwxws(d)
Some algorithms that perform this disparity selection as global methods are:
belief propagation (BP)
graph cut (GC)
dynamic programming (DP)
As previously noted, the local method can be retained for this step also.
Step 4: Disparity Refinement
In this step, the goal is to reduce noise generated through the previous steps and to refine the final disparity map. Among known techniques to do so include:
Gaussian convolution: reduces noise in the disparity map and can also reduce the amount of fine detail. Disparity is estimated using one of the neighboring pixels in compliance with weights of a Gaussian distribution
Median filter: removes small and isolated mismatches in disparity. Low computational complexity
Anisotropic diffusion: Applies smoothing without crossing any edges, unlike Gaussian convolution
These techniques are quite similar in their concept. Another way of improving the quality of the produced disparity map, according to some embodiments, is by doing a consistency check. In some embodiments, 2 disparity maps can be computed from the same stereo image pair. One by looking for matching pixels of the left image in the right image, and another by looking for the matching pixels of the right image in the left image. Due to at least occlusions, these 2 disparity maps of a same stereo image pair will not be the same. But with these 2 disparity maps, a left to right consistency check (LRC) can be performed in order to detect outliers and then several strategies exist to try to refine them.
This left to right consistency check consists of checking all the pixels in the left disparity map if the disparities correspond to the disparities in the right disparity map. For instance, let k be the disparity in the left disparity map at pixel (x,y): DL(x,y)=k. This means that pixel (x,y) in left original image best corresponds to pixel (x-k,y) in right original image when the disparity map is computed for the left image. On the other hand, it can be expected that pixel (x-k,y) in right original image best corresponds to pixel (x,y) in left original image when the disparity map is computed for the right image. Which can be expressed as: DR(x-k,y)=k. Thus, if DL(x,y)=k and DR(x-k,y)=k then disparity at pixel (x,y) in left disparity map can be considered as correct. Otherwise disparity at pixel (x,y) in left disparity map is considered as an outlier.
This LRC permits to detect occlusion problems or simple mismatches and several strategies to address the problems/mismatches are highlighted. For example, the non-trusted disparity may be interpolated with the neighbor disparities if such is considered as correct and if the neighboring pixels have a similar intensity to the pixel corresponding to this non-trusted disparity in the original image. Outliers can also be dealt with by using the information of another technique to determine the depth of a scene like using the data coming from a Time-of-Flight sensor for instance.
Various of these algorithms and methods have been tested. In certain instances, it has been found that for step 3, the Winner-Take-All method provided the best results, including with regard to simplicity. For step 1, the two best algorithms were found to be the AD algorithm and the SAD algorithm. In some embodiments, the AD algorithm was enhanced. In step 1, the matching cost computation, instead of computing the absolute differences of only one pixel in the left image and one pixel in the right image, in this improved version, the absolute differences of two consecutive pixels are computed. Then, knowing that the disparity that produces the smallest cost will be selected as the good one in step 3, a check is carried out on the value of the two costs resulting from the two absolute differences computation, and if both of them are smaller than a certain threshold, then the retained cost, which is the sum of these two, is reduced. Otherwise, if one of them or both of them are bigger than this threshold, the final cost is increased.
This change improves the function of step 3 and improves the quality of the produced disparity map while keeping a low computational cost compared to the SAD algorithm.
First, consider the following CFA image X with size (w×h) and a (2×2) color pattern size (the colors shows an example for the Bayer pattern “Green 1-Blue-Red-Green2 (GBRG)”):
where xi,j are pixel intensity values.
The same image can be represented as a four-color image U with size
Where Ui,j=[x2l,2f, x2i+1.2j, x2l,2j+1, x2i+1.2j+1].
The filtered image V with size m×n (same format as U), is given by the equations below.
where B (i, j , f) is the square neighborhood centered at Ui,j with size (2f+1)×(2f+1) from U image, σ and h are constant parameters. The weight w ∈ [0,1] depends on the color distance d (there are 4 colors so this is a 4-dimensional distance). This allows application of a bigger weight on similar pixels.
The σ parameter can work as a threshold to ignore noise effect on distances, when its value equals the standard deviation of the noise. Distances smaller than 2σ have their weights set to 1, while larger distances decrease at on exponential rate. The h parameter controls the strength of this exponential function, thus the weights of non-similar pixels. The effect of parameters on the weights relative to the distance can be seen in
The main difference with the NLM (Non-Local Means) algorithm (see Antoni Buades, Bartomeu Coll, and Jean-Michel Morel. “Non-Local Means Denoising,” Image Processing On Line, vol. 1 (2011), pp. 208-212. DOI: 10.5201/ipol.2011.bcm_nlm), which makes “W-means” algorithm a lot less iterative, is the computing of the distance d (last equation above). Instead of computing the distance with all Uk,l and Ui,j neighbors, this algorithm only cares about Uk,l and Ui,j colors. The advantage of having 4 colors is to be more accurate than with only 3 colors.
Various adjustments can then be performed to decrease the computational resources necessary to perform the W-means algorithm for noise reduction. The Euclidean distance in the third of three equations above, where the square factor requires a multiplier for each recursive step (for each color of each neighbor) and a square root for each neighbor, the following optimization was performed. The Euclidean distance can be replaced by the Manhattan (Taxicab) distance. Compared to the Euclidean distance, it is computed by removing the square root and computing an absolute value instead of the square, which improves the resource consumption. A simple 2D visualization of these distances can be seen in
The Euclidean distance gives the best estimation for the difference between 2 pixels. But, being compared to other differences, this algorithm only requires having comparable difference values. The Manhattan distance also quantifies the difference between 2 pixels, thus it can also be used for this application.
With this optimization, the last of the above three equations becomes the below equation:
The division by the parameter h in the second of the three above equations may optionally be handled by restricting h values to powers of 2. This way, only multiplexers and/or shifters are required. However, it is preferred to divide by a constant, from 1 to 8, even if that requires more logic elements. The exponential in the second of the three above equations may optionally be handled with threshold based binary weights. Binary weights may optionally be used generally to optimize the above equations.
The corrections will be implemented on raw CFA images, just before the debayer process. The input pixel stream consists in the following standard signals:
Pixel clock 1-bit: clock for following signals.
Pixel Data 12-bit: pixel intensity value.
Frame valid 1-bit: used to synchronize the start and the end of the frame.
Line valid 1-bit: means that the pixel data is valid, otherwise it is blanking data. This signal takes the value ‘1’ continuously for the entire row with.
The process units can have, at least, the interfaces shown in
The method used for defective pixel detection and correction is an adaptation of the algorithm proposed by Bailey and Jimmy (Single shell version; D. Bailey and J. S. Jimmy. “FPGA based multi-shell filter for hot pixel removal within colour filter array demosaicing,” 2016 International Conference on Image and Vision Computing New Zealand (IVCNZ), November 2016, pp. 1-6. DOI: 10.1109/IVCNZ.2016.7804450) is low resource consuming and produced good results during the tests. It is a spatial filter especially made for CFA images. A schematic of the method is shown in
Algorithms could be described by the below equation which is applied for all pixels in the image. The proposed implementation diagram is shown in
y
i,j=med(min(SCFA), xi,j, max(SCFA)),
where yi,j is the output pixel that depends on the input pixel xi,j and neighbors of same color SCFA represented by black dots in
The filter can remove defective pixels that do not belong in a defective pixel cluster (two or more defective neighbors). The sensor data sheet specifies that there are no clusters of defective pixels. Pixels in borders that cannot be processed (two rows on top and two on the bottom, and two columns on each side) are copied from the input to the output.
The diagram of the exemplary, illustrative FPGA implementation is shown in
The Create rows stream component allows to turn the single row stream into a three color-neighbors rows streams called rs1, rs3, and rs5. Due to the CFA image, the filter must process one in two rows. To do this the “2× rows buffer” stores 2 lines instead of one. Then, the Quad-register component can be used to extract the kernel, as in
Control signals: the pixel data is delayed by approximately two rows, so control signals (frame valid and line valid) must also have this delay. To do that, two more components were created: frame valid delay, that simply runs a counter on each frame valid input transition (when the counter reaches the required delay value, the output is inverted), and a line valid generator that is also based on a counter. When the counter starts, the valid signal is set. Then, when it reaches the image width, the valid signal is cleared.
Based on row and column counters, the line valid generator can be enabled on the second row of the input image and disabled two rows after the end. The copy signal is enabled when the output pixel corresponds to a border in the output image. Pixels residing in the image border are: 1st and 2nd row; 1st and 2nd column; 2nd last and last column; and 2nd last and last row.
The exemplary implementation of the bad pixel removal method in a camera system as described herein is shown in
Turning now to the architecture of the W-means method, shown in
The four components shown in
Generate kernel—this component permits to extract the image kernel to be processed.
Distance computation—the distance is computed following the Manhattan distance described in the previous equation.
Filter core “thr_optdiv”—a non-limiting, exemplary diagram of the main component of the filter is shown in
Division optimization: This process applies a division optimization, if the sum of weights is equal to a power of 2, the weight does not change. Else, all weights that overflow after the power of 2 are forced to 0.
Apply weights: Applying weights is simply done by a multiplexer. If the weight equal to 1 the associated pixel value is outputted, else it is 0. Then all multiplexers outputs are summed. Division—here the power of 2 divisions are made, where each divisor unit is only wiring.
Format output—the denoised color group stream needs to be formatted to a pixel stream. This component permits the algorithm to choose the valid color group to be outputted as a pixel stream.
An exemplary implementation of the “W-means” algorithm in the stereoscopic pixel stream can be added while keeping the bad pixel removal algorithm in a camera system as described herein is shown in
As tested on a Cyclone V FPGA, the system consumes only 5% of combinatorial logic and 7% of the memory. The FPGA tested was the Altera Cyclone V SOC (5CSTFD6D5F31I7N) FPGA). Optionally, the debayer method and the “W-means” algorithm could be combined or interwoven, to decrease resource usage. For every 4 clock cycles the “W-means” implementation only needs 1 to output 4 denoised pixels (only when color groups are valid). This means that during 3 clock cycles the algorithm does not need to filter the image. To improve resource consumption, instead of using a separate unit per pixel stream, both streams can be used in the same computing pipeline.
CMOS image sensors are sometimes characterized by quantum efficiency response. Hence, such sensors are monochromic by nature. In order to obtain a color image, a CFA is applied to the sensor output. Depending on the quantum efficiency of the filter, each pixel stores a single color information point. The particular selection of materials, used to realize the CFA, are usually not faithful to natural colors. The problem is typically due to an imperfect frequency range selectivity as well as cross color effect. In particular, each curve does not have a tight Gaussian shape (low selectivity), moreover the tails of each curve overlap each other (cross color effect). In order to correct the color appearance, each channel of the de-mosaiced image has to be multiplied by certain coefficients:
Where Xcam are R, G, B data coming from camera and Xcorr are R, G, B channel corrected values. The terms rj, gj, bj (with j assuming values 1, 2, 3) compose the color correction matrix.
Turning now to
A first estimation of the coefficients is obtained in stage 3204, for example by computing the minimum norm least square solution method in Tsung-Huang Chen and Shao-Yi Chien, “Cost effective color filter array de-mosaicking with chrominance variance weighted interpolation,” IEEE International Symposium on Circuits and Systems, 2007. ISCAS 2007, pages 1277-1280); where Xref terms are R, G, and B reference colors values in checker board, while Xcam terms are R, G, and B camera colors values sent by camera. Applying these coefficients to the image causes the response of each channel to better adhere to the ideal characteristics of the image. Nevertheless test output images featured large saturated regions (data not shown).
This is due a lack of compensation of the luminance component, defined, according to ITU-R recommendation BT.709, as:
When a direct correction is performed, the resulting luminance is higher than in the original frame. In order to maintain an unaltered luminance component, the following calculation is performed in stage 3206:
Consider x as pixels from original frame, y as pixels from directly corrected frame and y* as pixels from luminance corrected frame. These pixels are related one to the other by the two below equations, where A and C are 3×3 matrices.
y=Ax
y*=Cx
These matrices are linked by the relation:
A=αC
then
y=αy*
Where lum( ) is a function defined to calculate luminance component of input pixels. Because we are looking for a such that the luminance components of the original and final frames are equal, lum(y*)=lum(x), then a is:
The color correction matrix is then established in stage 3208. Multiplying the frame by the obtained C color correction matrix, a natural color frame image is obtained in stage 3210. Moreover, the image sensor response is more similar to an ideal one adjusted with original luminance.
FPGA system 3300 features an FPGA 3302, receiving input from a right sensor 3304 and a left sensor 3306. Data from each sensor 3304 and 3306 is fed to a preprocessing stage 3308, which runs preprocessing for data from each sensor separately as shown. For each sensor, preprocessing stage 3308 begins with denoising and bad pixel detection 3310, performed as previously described. Next the previously described debayer process 3312 is performed.
The results of the debayer process 3312 are then fed to the previously described color correction matrix (CCM) process 3314. The data from CCM process 3314 is used to determine the histogram 3318. The histogram then feeds to the previously described white balance correction process 3316. After that a rectify process 3320 is performed for stereo rectification as previously described.
FPGA system 3300 is shown with three branches, in
Turning to the first branch, “to A” (in
I2C controller 3326 is also in communication with a depth controller 3330 for synchronizing the timing of the depth sensor data. Optionally all sensor data passes through I2C controller 3326, including but not limited to sensors 3304 and 3306, and sensors 3346.
In the second branch, “to B” (in
GPIF IF 3342 also receives additional sensor data from an additional sensors FIFO buffer 3344, which in turn optionally receives sensor data from multiple sensors 3346, of which two examples are shown for the purpose of illustration and without any intention of being limiting. Non-limiting examples that are shown include a MCU inertial sensor 3346A and a MCU coordinator 3346B. This data is optionally fed through a controller 3348, which may be an SPI (serial peripheral bus) controller for example.
Processed information is then output from GPIF IF 3342 to the USB chip 3350 for example.
The actions of GPIF IF 3342 may be assisted by computations performed by SOC (system on chip) 3360, optionally with an external memory 3362. SOC 3360, using external memory 3362, is able to increase the speed of performance of GPIF IF 3342 by performing computations more quickly. SOC 3360 acts as embedded processor with a DMA (direct memory access) module 3361. For example, SOC 3360 can perform calculations related to stereo data (including depth and RGB data) through sensor FIFOs 3334A, 3334B and 3338.
Turning now to the third branch, labeled “to C” in
While various inventive embodiments have been described and illustrated herein, those of ordinary skill in the art will readily envision a variety of other means, structures, steps, and/or functionality for performing the function and/or obtaining the results and/or one or more of the advantages described herein, and each of such variations and/or modifications is deemed to be within the scope of the inventive embodiments described herein. More generally, those skilled in the art will readily appreciate that all parameters, dimensions, materials, structure, functionality, steps, processes, and configurations described herein are meant to be exemplary and that the actual parameters, dimensions, materials, structure, functionality, steps, processes, and configurations will depend upon the specific application or applications for which the inventive teachings is/are used. Those skilled in the art will recognize, or be able to ascertain using no more than routine experimentation, many equivalents to the specific inventive embodiments described herein. It is, therefore, to be understood that the embodiments disclosed herein are presented by way of example only and that, such embodiments (and any embodiments supported by the present disclosure either expressly, implicitly or inherently) may be practiced otherwise than as specifically described and claimed. Some embodiments of the present disclosure are directed to each individual feature, system, function, article, material, instructions, step, kit, and/or method described herein, and any combination of two or more such features, systems, functions, articles, materials, kits, steps, and/or methods, if such features, systems, functions, articles, materials, kits, steps and/or methods are not mutually inconsistent, is included within the inventive scope of the present disclosure. Additionally, some embodiments of the present disclosure are inventive over the prior art by specifically lacking one and/or another feature/functionality disclosed in such prior art (i.e., claims to such embodiments can include negative limitations to distinguish over such prior art).
Also, various inventive concepts may be embodied as one or more steps/methods, of which examples have been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in an order different than illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in illustrative embodiments.
Any and all references to publications or other documents, including but not limited to, patents, patent applications, articles, webpages, books, etc., presented in the present application, are herein incorporated by reference in their entirety.
All definitions, as defined and used herein, should be understood to control over dictionary definitions, definitions in documents incorporated by reference, and/or ordinary meanings of the defined terms.
Number | Date | Country | |
---|---|---|---|
62456045 | Feb 2017 | US | |
62553953 | Sep 2017 | US | |
62598487 | Dec 2017 | US |