This application claims priority of Indian Application Serial No. 201941005109, filed Feb. 8, 2019, the contents of which are incorporated herein by reference.
Various embodiments of the disclosure relate generally to driving assistance systems. More specifically, various embodiments of the disclosure relate to calibration of a fixed image-capturing device for depth estimation.
Advancements in the field of automobiles along with a continuously increasing demand for personal and commercial vehicles have vastly increased the number of vehicles that are plying along various roads on a daily basis, thus increasing the traffic density. The increased traffic density of traffic on the roads has resulted in a rapid rise in the number of collisions of the vehicles with stationary or moving objects. Thus, driving a vehicle is becoming a complex procedure, especially along roads with the dense traffic. While driving through the dense traffic, a driver of the vehicle can encounter critical situations that the driver is unable to solve quickly and thus can cause accident. Hence, to avoid such accidents, it is imperative for the driver to be aware of the possible critical situations well in advance. In one possible solution, the proximity of near-by objects (such as other vehicles, trees, pedestrians, and the like) is estimated and communicated to the driver for providing driving assistance while driving the vehicle. To facilitate providing the driving assistance to the driver, the vehicle is equipped with various proximity sensors that detect presence of the near-by objects and estimate distances of each near-by object from the vehicle. However, the use of proximity sensors has its own limitations. The proximity sensors are typically range-specific and thus are not effective all the time. Further, an angle of coverage of a proximity sensor is typically small (e.g., 5°-15°). Hence, to ensure an entire coverage of the vehicle's path, multiple proximity sensors are installed on the vehicle, which may not be desirable due to increased cost and complexity.
One conventional approach to solve the above-mentioned problems is to use a camera installed on the vehicle to estimate the distances of the near-by objects from the vehicle. This conventional approach estimates the distance of a near-by object from the vehicle based on a ratio between observed dimensions of the object in an image captured by the camera and actual dimensions of the object. However, with such approach, actual dimensions of various objects should be known beforehand, which may not be feasible all the time.
In light of the foregoing, there exists a need for a technical and reliable solution that overcomes the above-mentioned problems, challenges, and short-comings, and manages depth estimation of various objects for facilitating driving assistance to drivers of vehicles in a manner that may offer reliable and enhanced experiences to the drivers.
Calibration of a fixed image-capturing device for depth estimation is provided substantially as shown in, and described in connection with, at least one of the figures, as set forth more completely in the claims.
These and other features and advantages of the disclosure may be appreciated from a review of the following detailed description of the disclosure, along with the accompanying figures in which like reference numerals refer to like parts throughout.
Certain embodiments of the disclosure may be found in a disclosed apparatus for calibration of a fixed image-capturing device of a vehicle for depth estimation. Exemplary aspects of the disclosure provide a method and a system for calibrating the fixed image-capturing device of the vehicle and predicting a distance of an object from the vehicle. The method includes one or more operations that are executed by circuitry of the disclosed apparatus to perform calibration of the fixed image-capturing device. The circuitry may be configured to identify a first plurality of rows of pixels in a first image. The first image may be captured by the image-capturing device. The first image may include a plurality of lines that are at known distances from the image-capturing device. The first plurality of rows of pixels may correspond to the plurality of lines. The circuitry may be further configured to estimate a focal length of the image-capturing device. The focal length may be estimated based on at least a known distance of a first line of the plurality of lines and a first width of the first line in the first image. The circuitry may be further configured to estimate a first distance of each row of pixels of a second plurality of rows of pixels in the first image from the image-capturing device. The first distance may be estimated based on at least the focal length and a second width of a second line corresponding to each row of pixels. The second width may be estimated based on at least the plurality of lines and each row of pixels. The first image may comprise the first plurality of rows of pixels and the second plurality of rows of pixels. The circuitry may be further configured to store the known distances of the first plurality of rows of pixels and the estimated first distances of the second plurality of rows of pixels in a memory. Further, a second distance of a first object from a second object may be predicted based on the stored distances and a second image of the first object.
Another exemplary aspect of the disclosure provides a method and a system for predicting a distance of an object from a vehicle. The method includes one or more operations that are executed by a vehicle device installed in the vehicle. In one embodiment, the vehicle device may include circuitry such as an image-capturing device, a processor, and a memory. In another embodiment, the vehicle device may only include circuitry such as a processor and a memory, and the image-capturing device and the vehicle device may be separate from each other. In an embodiment, the image-capturing device may be configured to capture a first image of a first object. The processor may be configured to detect a bottom edge of the first object based on the first image. The processor may be further configured to identify a first row of pixels in the first image corresponding to the detected bottom edge. The processor may be further configured to predict a distance of the first object from the vehicle based on a distance value retrieved from a distance data set that may be stored in the memory of the vehicle device or a separate memory device installed in the vehicle. The distance value may be retrieved from the distance data set based on at least the first row of pixels.
The distance data set may be estimated by executing one or more calibration operations. For example, a second plurality of rows of pixels in a second image including a plurality of lines may be identified. The second plurality of rows of pixels may correspond to the plurality of lines. The plurality of lines may be at known distances from a second object. The second plurality of rows of pixels may be identified by converting the second image from a first color model to a second color model. The first or second color model may be at least one of a black and white color model, a greyscale color model, a red, green, and blue (RGB) color model, a hue, saturation, and value (HSV) color model, a cyan, magenta, yellow, and black (CMYK) color model, a hue, saturation, and brightness (HSB) color model, a hue, saturation, and lightness (HSL) color model, or a hue, chroma, and value (HCV) color model. The first color model may be different from the second color model. The identification of the second plurality of rows of pixels further includes filtering the converted second image to obtain a filtered second image including a known color. The second plurality of rows of pixels may be identified based on the filtered second image.
Further, the distance data set for a third plurality of rows of pixels in the second image may be estimated based on at least a known distance of a first line of the plurality of lines, a first width of the first line in the second image, and a second width of a second line corresponding to each of the third plurality of rows of pixels. Each distance value in the distance data set may indicate a distance of each row of pixels of the third plurality of rows of pixels from the second object. The second width may be estimated based on at least the plurality of lines and each row of pixels of the third plurality of rows of pixels. The distance data set may further include the known distances. The second image may comprise the second plurality of rows of pixels and the third plurality of rows of pixels. The retrieved distance value may be associated with a fourth row of pixels in the second image having a row number that is equal to a row number of the first row of pixels in the first image. Upon prediction of the distance of the first object from the vehicle, the processor may be configured to generate a warning message based on at least the predicted distance. The processor may be further configured to communicate the warning message to a driver of the vehicle indicating an impending collision.
Thus, various methods and systems of the disclosure facilitate calibration of a fixed image-capturing device of a vehicle to obtain distance data set that is further utilized to predict a distance of a first object from the vehicle in real-time. The distance data set may be obtained by identifying a plurality of rows of pixels and determining corresponding distances by utilizing line correspondences of a plurality of lines on a ground plane. The plurality of lines may be mapped to a plurality of rows of pixels in an image captured by the fixed image-capturing device during the calibration of the fixed image-capturing device. Thus, the accuracy of identification of the plurality rows of pixels and determination of the distance data set may be higher as compared to conventional distance prediction approaches that use point correspondences. Further, since distances of the distance data set may be estimated based on the plurality of lines on the ground plane, and distances of various objects (such as the first object) from the vehicle may be predicted based on the distance data set, a beforehand need for knowing actual dimensions of the various objects is eliminated. Thus, the various methods and systems of the disclosure facilitate an efficient, effective, and accurate way of identifying various obstacles, predicting distances of each obstacle, and notifying a driver of the vehicle of an impending collision, if any, well in advance.
In an embodiment, the vehicle 102 may include a distance prediction mechanism. The distance prediction mechanism may facilitate detection of a first object in front of the vehicle 102 and prediction of a first distance of the first object from the vehicle 102. Examples of the first object may include, but are not limited to, a pedestrian, an animal, a vehicle, a road-divider, a non-driveable area, a rock, a road sign, a building, and a tree. For facilitating prediction of the first distance in real-time, the distance prediction mechanism may be calibrated. Thus, the vehicle 102 may be subjected to a calibration phase (in which the distance prediction mechanism may be calibrated) and an implementation phase (in which the distance prediction mechanism may predict the first distance based on the calibration). In an embodiment, the distance prediction mechanism may be realized or implemented by the vehicle device 104 including the image-capturing device 106, the processor 108, and the memory 110. In another embodiment, the distance prediction mechanism may be realized or implemented by a combination of the image-capturing device 112 and the vehicle device 114 including the processor 116 and the memory 118. Here, the image-capturing device 112 and the vehicle device 114 are separate devices installed in the vehicle 102. In another embodiment, the distance prediction mechanism may be realized or implemented by a combination of the image-capturing device 106 or 112, the application server 120, and the database server 122.
The vehicle 102 is a mode of transportation that is used by a user to commute from one location to another location. In an embodiment, the vehicle 102 may be owned by the user. In another embodiment, the vehicle 102 may be owned by a vehicle service provider for offering on-demand vehicle or ride services to one or more passengers (e.g., the user). The vehicle 102 may include one or more vehicle devices such as the vehicle device 104 or the vehicle device 114. Examples of the vehicle 102 may include, but are not limited to, an automobile, a bus, a car, an auto-rickshaw, and a bike.
The vehicle device 104 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations. The vehicle device 104 may be a computing device that is installed in the vehicle 102. Examples of the vehicle device 104 may include, but are not limited to, a mobile phone, a tablet, a laptop, a vehicle head unit, or any other portable communication device that is placed inside the vehicle 102. The vehicle device 104 may be realized through various web-based technologies such as, but not limited to, a Java web-framework, a .NET framework, a PHP (Hypertext Preprocessor) framework, or any other web-application framework. The vehicle device 104 may be further realized through various embedded technologies such as, but are not limited to, microcontrollers or microprocessors that are operating on one or more operating systems such as Windows, Android, Unix, Ubuntu, Mac OS, or the like.
In an embodiment, the vehicle device 104 may be installed on a front windshield (shown in
In an embodiment, the vehicle device 104 may be calibrated in the calibration phase. Based on the calibration, the vehicle device 104 may be configured to predict the first distance of the first object from the vehicle 102 in the implementation phase. The vehicle device 104 may be configured to execute the calibration and implementation phases by utilizing the image-capturing device 106, the processor 108, and the memory 110. The image-capturing device 106, the processor 108, and the memory 110 may communicate with each other via a first communication bus (not shown).
The image-capturing device 106 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations. For example, the image-capturing device 106 may be an optical instrument that includes one or more image sensors for recording or capturing a set of images. The set of images may be individual still photographs or a sequence of images constituting a video. In an embodiment, the image-capturing device 106 may be a red, green, and blue (RGB) camera. Thus, the set of images (captured by the image-capturing device 106) may be associated with an RGB color model. However, a person having ordinary skill in the art would understand that the scope of the disclosure is not limited to this specific scenario in which the image-capturing device 106 may be configured to capture the set of images associated with the RGB color model. In various other embodiments, the set of images captured by the image-capturing device 106 may be associated with a different color model such as a black and white color model, a greyscale color model, a hue, saturation, and value (HSV) color model, a cyan, magenta, yellow, and black (CMYK) color model, a hue, saturation, and brightness (HSB) color model, a hue, saturation, and lightness (HSL) color model, a hue, chroma, and value (HCV) color model, or the like.
In an embodiment, in the calibration phase, the image-capturing device 106 may be configured to capture a first image (shown in
In an embodiment, the calibration system or environment (hereinafter, “the calibration system”) may include the vehicle 102, a carpet (shown in
In an embodiment, in the implementation phase, the image-capturing device 106 may be configured to capture a second image (shown in
The processor 108 may include suitable logic, circuitry, interfaces, and/or codes, executable by the circuitry, that may be configured to perform one or more operations. Examples of the processor 108 may include, but are not limited to, an application-specific integrated circuit (ASIC) processor, a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, and a field-programmable gate array (FPGA). It will be apparent to a person skilled in the art that the processor 108 may be compatible with multiple operating systems.
In an embodiment, the one or more operations may be associated with the calibration phase and the implementation phase. In an embodiment, in the calibration phase, the processor 108 may be configured to receive the first image from the image-capturing device 106. The processor 108 may be further configured to process the first image to identify first and second rows of pixels (shown in
In an embodiment, the processor 108 may be further configured to estimate a width of each of remaining rows of pixels (i.e., a second plurality of rows of pixels) in the first image. For example, for each remaining row of pixels in the first image, the processor 108 may be configured to determine the width of a corresponding line based on a second distance between the corresponding row of pixels and the first or second row of pixels, the first and second observed widths, and a first angle. The first angle may be obtained by joining the same ends of the first and second calibration lines (as shown in
In an embodiment, in the implementation phase, the processor 108 may be configured to receive the second image from the image-capturing device 106. The processor 108 may be further configured to process the second image to identify the one or more objects (such as the first object) captured in the second image. Further, the processor 108 may be configured to detect a first bottom edge of the first object. The processor 108 may be further configured to identify, in the second image, a third row of pixels associated with the first bottom edge. In an embodiment, based on the third row of pixels, the processor 108 may be further configured to retrieve a first distance value from the distance data set stored in the memory 110. In another embodiment, based on the third row of pixels, the processor 108 may be configured to transmit a query to the database server 122 to retrieve the first distance value from the distance data set stored in the database server 122. The first distance value may correspond to a fourth row of pixels in the first image having a row number that is equal to a row number of the third row of pixels in the second image. Thereafter, the processor 108 may be configured to predict the first distance of the first object from the vehicle 102 based on at least the retrieved first distance value. Based on the predicted first distance, the processor 108 may be configured to generate a warning message and communicate the warning message to a driver of the vehicle 102 to provide driving assistance in real-time. For example, if the first distance is less than a threshold value, then the processor 108 may generate the warning message indicating an impending collision, for example, the generated warning message may read as “Hey driver! There is an obstacle at 5 m from your vehicle. The chances of the impending collision with the obstacle is high if you drive at the current speed. Go slow!!”. Further, the processor 108 may communicate the warning message to the driver. The warning message may be communicated to the driver by communicating a short message service (SMS), an audio message, a video message, a haptic message, or the like.
The memory 110 may include suitable logic, circuitry, interfaces, and/or codes, executable by the circuitry, that may be configured to store one or more instructions that are executed by the image-capturing device 106 or the processor 108 to perform their operations. The memory 110 may be configured to store the first image, the second image, and the distance data set. Examples of the memory 110 may include, but are not limited to, a random-access memory (RAM), a read-only memory (ROM), a programmable ROM (PROM), and an erasable PROM (EPROM).
The image-capturing device 112 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations. For example, the image-capturing device 112 may be an optical instrument that includes one or more image sensors for recording or capturing a set of images. The set of images may be individual still photographs or a sequence of images constituting a video. In an embodiment, the image-capturing device 112 may be installed on the front windshield of the vehicle 102 such that the image-capturing device 112 is positioned at a center of the front windshield and may be oriented to face outside the vehicle 102 for capturing the various objects (such as the first object) present in front of the vehicle 102. In another embodiment, the image-capturing device 112 may be installed behind the front windshield such that the image-capturing device 112 is positioned at a center of the front windshield and may be oriented to face outside the vehicle 102 for capturing the various objects present in front of the vehicle 102. In another embodiment, the image-capturing device 112 may be installed on the rear windshield of the vehicle 102 such that the image-capturing device 112 is positioned at a center of the rear windshield and may be oriented to face outside the vehicle 102 for capturing the various objects present behind the vehicle 102. The image-capturing device 112 may be connected to the vehicle device 114 via the communication network 124 or a second communication bus (not shown). Further, the image-capturing device 112 may be connected to the application server 120 via the communication network 124.
In an embodiment, in the calibration phase, the image-capturing device 112 may be configured to capture the first image of the calibration system and transmit the first image to the vehicle device 114 or the application server 120. In an embodiment, in the implementation phase, the image-capturing device 112 may be configured to capture the second image of the road (or the route segment) along which the vehicle 102 is currently traversing. Upon capturing of the second image, the image-capturing device 112 may be configured to transmit the second image to the processor 116, store the second image in the memory 118, transmit the second image to the application server 120, or transmit the second image to the database server 122. The second image may include the one or more objects (such as the first object) or a portion of the one or more objects that are present in a capturing range of the image-capturing device 112. The image-capturing device 112 may be structurally and functionally similar to the image-capturing device 106. However, the image-capturing device 106 is embedded within the vehicle device 104 whereas the image-capturing device 112 is a stand-alone device.
The vehicle device 114 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations. The vehicle device 114 may be a computing device that is installed in the vehicle 102. Examples of the vehicle device 114 may include, but are not limited to, a mobile phone, a tablet, a laptop, a vehicle head unit, or any other portable communication device that is placed inside the vehicle 102. The vehicle device 114 may be realized through various web-based technologies such as, but not limited to, a Java web-framework, a .NET framework, a PHP framework, or any other web-application framework. The vehicle device 114 may be further realized through various embedded technologies such as, but are not limited to, microcontrollers or microprocessors that are operating on one or more operating systems such as Windows, Android, Unix, Ubuntu, Mac OS, or the like.
In an embodiment, the vehicle device 114 may be communicatively connected to the image-capturing device 112 for receiving one or more images (such as the first image and the second image) captured by the image-capturing device 112. The vehicle device 114 may be configured to execute various processes of the calibration and implementation phases by utilizing the processor 116 and the memory 118. In an embodiment, the processor 116 and the memory 118 may communicate with each other via a third communication bus (not shown).
The processor 116 may include suitable logic, circuitry, interfaces, and/or codes, executable by the circuitry, that may be configured to perform one or more operations. Examples of the processor 116 may include, but are not limited to, an ASIC processor, a RISC processor, a CISC processor, and an FPGA. It will be apparent to a person skilled in the art that the processor 116 may be compatible with multiple operating systems.
In an embodiment, the one or more operations may be associated with the calibration phase and the implementation phase. In an embodiment, in the calibration phase, the processor 116 may be configured to receive the first image from the image-capturing device 112. The processor 116 may be further configured to process the first image to identify the first and second rows of pixels in the first image. The first and second rows of pixels (i.e., the first plurality of rows of pixels) may correspond to the first and second calibration lines. Based on at least the first calibration line or the second calibration line, the processor 116 may be further configured to estimate the focal length of the image-capturing device 112. In an example, the processor 116 may estimate the focal length of the image-capturing device 112 based on the first known distance of the first calibration line from the vehicle 102 (or the image-capturing device 112 of the vehicle 102), the known width of the first calibration line on the carpet, and the first observed width. In another example, the processor 116 may estimate the focal length of the image-capturing device 112 based on the second known distance of the second calibration line from the vehicle 102 (or the image-capturing device 112 of the vehicle 102), the known width of the second calibration line on the carpet, and the second observed width.
In an embodiment, the processor 116 may be further configured to estimate the width of each of remaining rows of pixels (i.e., the second plurality of rows of pixels) in the first image. For example, for each remaining row of pixels in the first image, the processor 116 may determine the width of the corresponding line based on the second distance, the first and second observed widths, and the first angle. The processor 116 may be further configured to estimate the third distance of each remaining row of pixels in the first image from the vehicle 102 (or the image-capturing device 112 of the vehicle 102) based on at least the estimated width of the corresponding line, the known width, and the focal length of the image-capturing device 112. Thus, each row of pixels in the first image may be associated with a corresponding distance from the vehicle 102 (or the image-capturing device 112 of the vehicle 102). In an embodiment, the processor 116 may be further configured to store the distance data set (i.e., the first and second known distances and the estimated third distances) in the memory 118. In another embodiment, the processor 116 may be further configured to store the distance data set in the database server 122.
In an embodiment, in the implementation phase, the processor 116 may be configured to receive the second image from the image-capturing device 112. The processor 116 may be further configured to process the second image to identify the one or more objects (such as the first object) captured in the second image. Further, the processor 116 may be configured to detect the first bottom edge of the first object. The processor 116 may be further configured to identify, in the second image, the third row of pixels associated with the first bottom edge. In an embodiment, based on the third row of pixels, the processor 116 may be further configured to retrieve the first distance value from the distance data set stored in the memory 118. In another embodiment, based on the third row of pixels, the processor 116 may be further configured to transmit a query to the database server 122 to retrieve the first distance value from the distance data set stored in the database server 122. The first distance value may correspond to the fourth row of pixels in the first image having a row number that is equal to a row number of the third row of pixels in the second image. Thereafter, the processor 116 may be configured to predict the first distance of the first object from the vehicle 102 based on at least the retrieved first distance value. Based on the predicted first distance, the processor 116 may be configured to generate the warning message and communicate the warning message to the driver of the vehicle 102 to provide driving assistance in real-time. Additionally, the processor 116 may generate the warning message based on the predicted first distance and speed of the vehicle 102.
The memory 118 may include suitable logic, circuitry, interfaces, and/or codes, executable by the circuitry, that may be configured to store one or more instructions that are executed by the processor 116 to perform the one or more operations. The memory 118 may be configured to store the first image, the second image, and the distance data set. Examples of the memory 118 may include, but are not limited to, a RAM, a ROM, a PROM, and an EPROM.
The application server 120 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations for device calibration and depth estimation. The application server 120 may be a computing device, which may include a software framework, that may be configured to create the application server implementation and perform the various operations associated with the device calibration and depth estimation. The application server 120 may be realized through various web-based technologies, such as, but not limited to, a Java web-framework, a .NET framework, a PHP framework, a python framework, or any other web-application framework. Examples of the application server 120 may include, but are not limited to, a personal computer, a laptop, or a network of computer systems. The application server 120 may be communicatively connected to the vehicle device 104 or the image-capturing device 112 and vehicle device 114 via the communication network 124.
In an exemplary embodiment, the application server 120 may be configured to receive the first image from the image-capturing device 112. The application server 120 may be further configured to process the first image to identify the first and second rows of pixels in the first image corresponding to the first and second calibration lines, respectively. Based on at least the first calibration line or the second calibration line, the application server 120 may be further configured to estimate the focal length of the image-capturing device 112. The application server 120 may be further configured to estimate, for each remaining row of pixels in the first image, the width of the corresponding line based on the second distance, the first and second observed widths, and the first angle. The application server 120 may be further configured to estimate the third distance of each remaining row of pixels from the vehicle 102 (or the image-capturing device 112 of the vehicle 102) based on the estimated width of the corresponding line, the known width, and the focal length. Thus, each row of pixels in the first image may be associated with a corresponding distance from the vehicle 102 (or the image-capturing device 112 of the vehicle 102). In an embodiment, the application server 120 may be further configured to store the distance data set (i.e., the first and second known distances and the estimated third distances) in the database server 122.
In an embodiment, in the implementation phase, the application server 120 may be configured to receive the second image from the image-capturing device 112. The application server 120 may be further configured to process the second image to identify the one or more objects (such as the first object) captured in the second image. Further, the application server 120 may be configured to detect the first bottom edge of the first object and identify the third row of pixels associated with the first bottom edge in the second image. Based on the third row of pixels, the application server 120 may be further configured to transmit a query to the database server 122 to retrieve the first distance value from the distance data set stored in the database server 122. The first distance value may correspond to the fourth row of pixels in the first image having a row number that is equal to a row number of the third row of pixels in the second image. Thereafter, the application server 120 may be configured to predict the first distance of the first object from the vehicle 102 based on at least the retrieved first distance value. Based on the predicted first distance, the application server 120 may be further configured to generate the warning message and communicate the warning message to the driver of the vehicle 102 to provide driving assistance in real-time.
The database server 122 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to perform one or more operations, such as receiving, storing, processing, and transmitting queries, data, or content. The database server 122 may be a data management and storage computing device that is communicatively coupled to the vehicle device 104, the image-capturing device 112, the vehicle device 114, and the application server 120 via the communication network 124 to perform the one or more operations. In an exemplary embodiment, the database server 122 may be configured to manage and store one or more images (such as the first image) captured by the image-capturing device 106 or 112. The database server 122 may be further configured to manage and store one or more images (such as the second image) captured by the image-capturing device 106 or 112. The database server 122 may be further configured to manage and store the distance data set. The database server 122 may be further configured to manage and store one or more warning messages corresponding to one or more first distances of the one or more objects from the vehicle 102.
In an embodiment, the database server 122 may be configured to receive one or more queries from the processor 108, the processor 116, or the application server 120 via the communication network 124. Each query may correspond to an encrypted message that is decoded by the database server 122 to determine a request for retrieving requisite information. In response to each received query, the database server 122 may be configured to retrieve and communicate the requested information to the processor 108, the processor 116, or the application server 120 via the communication network 124. Examples of the database server 122 may include, but are not limited to, a personal computer, a laptop, or a network of computer systems.
The communication network 124 may include suitable logic, circuitry, interfaces, and/or code, executable by the circuitry, that may be configured to transmit queries, data, content, messages, and requests between various entities, such as the vehicle device 104, the image-capturing device 112, the vehicle device 114, the application server 120, and/or the database server 122. Examples of the communication network 124 may include, but are not limited to, a wireless fidelity (Wi-Fi) network, a light fidelity (Li-Fi) network, a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a satellite network, the Internet, a fiber optic network, a coaxial cable network, an infrared (IR) network, a radio frequency (RF) network, and a combination thereof. Various entities in the environment 100 may connect to the communication network 124 in accordance with various wired and wireless communication protocols, such as Transmission Control Protocol and Internet Protocol (TCP/IP), User Datagram Protocol (UDP), Long Term Evolution (LTE) communication protocols, or any combination thereof.
Although the present disclosure describes the calibration and implementation phases being executed in association with the same vehicle (e.g., the vehicle 102), it will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the same vehicle for executing the calibration and implementation phases. In various other embodiments, the calibration and implementation phases may be executed for two separate vehicles (such as a first vehicle and a second vehicle). In such a scenario, to ensure accuracy of the distance prediction, a position of an image-capturing device (such as the image-capturing device 106 or the image-capturing device 112) on the first vehicle in the calibration phase is the same as a position of another image-capturing device on the second vehicle in the implementation phase. Further, specification of the image-capturing devices used with the first vehicle and the second vehicle may be the same. Further, various dimensions of the first vehicle and the second vehicle may be similar. Various operations associated with the calibration of fixed image-capturing devices of vehicles for depth estimation have been described in detail in conjunction with
It will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the installation of the vehicle device 104 as shown in
It will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the installation of the image-capturing device 112 and the vehicle device 114 as shown in
Since the first known distance d1 is less than the second known distance d2, the first observed width w1 (i.e., the width of the first calibration line c1 as observed in the first image 304) is greater than the second observed width w2 (i.e., the width of the second calibration line c2 as observed in the first image 304) even though the first and second calibration lines c1 and c2 may have the same width (i.e., the known width W) on the carpet 302. The difference in the first and second observed widths w1 and w2 may be represented by δw. Further, when the first and second calibration lines c1 and c2 are centered with respect to an axis passing through the center of the image-capturing device 106, the difference in the first and second observed widths w1 and w2 may be symmetric on both sides of the axis (illustrated as δw/2 in the first image 304 of
It will be apparent to a person having ordinary skill in the art that vertical edges of the carpet 302 (that are straight lines in the calibration system 300) may be observed as tilted lines in the first image 304 due to perspective distortion. In other words, the carpet 302 with a rectangular shape may be observed as a trapezoid in the first image 304. The distance between the first and second rows of pixels (illustrated by h in the first image 304) may correspond to the height of the trapezoid. An angle θ may be the first angle between the first calibration line c1 and a first line joining the end points of the first and second calibration lines c1 and c2, as shown in
In operation, the distance prediction mechanism associated with the vehicle 102 may be calibrated in the calibration phase to predict the first distance of the first object captured in front of the vehicle 102 in the implementation phase. For the sake of ongoing description, it is assumed that the distance prediction mechanism may be realized and implemented by utilizing the vehicle device 104 that is installed with the vehicle 102. The vehicle device 104 may include the image-capturing device 106, the processor 108, and the memory 110. However, it will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the realization and implementation of the distance prediction mechanism by utilizing the vehicle device 104. In various other embodiments, the distance prediction mechanism may be realized and implemented by utilizing the image-capturing device 112 and the vehicle device 114, the image-capturing device 112, the application server 120, and the database server 122, or any combination thereof.
In the calibration phase, the vehicle device 104 may be calibrated by utilizing the calibration system 300. The calibration system 300 may include the first and second calibration lines c1 and c2 on the carpet 302 such that the first and second calibration lines c1 and c2 may have the same width (i.e., the known width W) that is equal to a width of the carpet 302. Further, the first and second calibration lines c1 and c2 may be drawn at the first and second known distances d1 and d2 from the vehicle 102, respectively. The first and second calibration lines c1 and c2 may be parallel to each other and perpendicular to the path of the vehicle 102. In an embodiment, during execution of calibration processes of the calibration phase, the image-capturing device 106 may be configured to capture the first image 304 of the calibration system 300. The first image 304 illustrates the first and second calibration lines c1 and c2 having the first and second observed widths w1 and w2, respectively. Upon capturing the first image 304, the image-capturing device 106 may be configured to transmit the first image 304 to the processor 108. In an embodiment, a color model associated with the first image 304 is the RGB color model.
In an embodiment, the processor 108 may be configured to receive the first image 304 from the image-capturing device 106 and process the first image 304 to identify the first plurality of rows of pixels (such as the first and second rows of pixels r1 and r2) in the first image 304. The first and second rows of pixels r1 and r2 may correspond to the first and second calibration lines c1 and c2, respectively. In an embodiment, the processor 108 may be configured to identify the first and second rows of pixels r1 and r2 based on one or more inputs provided by the administrator utilizing one or more input/output ports (not shown) of the vehicle device 104. In another embodiment, the processor 108 may be configured to convert the first image 304 from the RGB color model to another color model such as the HSV color model. Thereafter, the processor 108 may be further configured to filter the converted first image (not shown) to obtain a known color of the carpet 302, and further process the filtered first image (shown in
Further, in an embodiment, the processor 108 may be configured to estimate the focal length of the image-capturing device 106. The focal length of the image-capturing device 106 may be estimated based on at least the first calibration line c1 or the second calibration line c2. In an exemplary embodiment, the processor 108 may estimate the focal length of the image-capturing device 106 based on the first known distance d1 of the first calibration line c1 from the vehicle 102, the known width W of the first calibration line c1 on the carpet 302, and the first observed width w1. In another exemplary embodiment, the processor 108 may estimate the focal length of the image-capturing device 106 based on the second known distance d2 of the second calibration line c2 from the vehicle 102, the known width W of the second calibration line c2 on the carpet 302, and the second observed width w2. For example, the focal length F may be estimated by utilizing a first equation (1) as shown below:
where,
wk indicates the first observed width w1 or the second observed width w2,
dk indicates the first known distance d1 or the second known distance d2, and
W indicates the known width of the first and second calibration lines c1 and c2.
In an embodiment, the estimated focal length F may vary based on a calibration line used for the estimation. For example, based on the first calibration line c1 that is at the 5 m distance from the vehicle 102, the focal length F may be estimated as 794.118. In another example, based on the second calibration line c2 that is at the 10 m distance from the vehicle 102, the focal length F may be estimated as 917.647.
Further, as illustrated in
where,
h indicates the second distance between the first and second rows of pixels (r2−r1), and
θ indicates the angle of the isosceles trapezoid.
Thus, the difference δw may be estimated by utilizing a third equation (3) as shown below:
δw=2*h*cot θ (3)
In an embodiment, for one or more rows of pixels above the first row of pixels r1, a width of a corresponding line may be reduced. Thus, for a third line (not shown) corresponding to a fifth row of pixels r5 that is between the first and second rows of pixels r1 and r2 in the first image 304, a width of the third line may be less than the first observed width w1 and more than the second observed width w2. Hence, the width of the third line (hereinafter, “the third width”) may be estimated based on a change in width of the third line with respect to either the first calibration line c1 or the second calibration line c2. For example, the third width w3 of the third line with respect to the first calibration line c1 may be estimated by utilizing a fourth equation (4) as shown below:
w
3
=w
1−δw′ (4)
where, δw′=2*(r5−r1)*cot θ.
Similarly, a width of a line corresponding to an “ith” row of pixels ri above the first row of pixels r1 may be estimated by utilizing a fifth equation (5) as shown below:
w
i
=w
1−2*(ri−r1)*cot θ (5)
where,
(ri−r1) indicates the second distance between the “ith” row of pixels ri and the first row of pixels r1.
In an embodiment, for one or more rows of pixels below the first row of pixels, a width of a corresponding line may be increased. Hence, a width of a line corresponding to a “jth” row of pixels rj below the first row of pixels r1 may be estimated by utilizing a sixth equation (6) as shown below:
w
j
=w
1+2*(r1−rj)*cot θ (6)
where,
(ri−ri) indicates the second distance between the first row of pixels r1 and the “jth” row of pixels rj.
Similarly, for one or more rows of pixels below the second row of pixels r2, a width of a corresponding line may be increased. Hence, the third width w3 with respect to the second calibration line c2 may be estimated by utilizing a seventh equation (7) as shown below:
w
3
=w
2+δw′ (7)
Similarly, a width of a line corresponding to a “pth” row of pixels rp below the second row of pixels r2 may be estimated by utilizing an eighth equation (8) as shown below:
w
p
=w
2+2*(r2−rp)*cot θ (8)
where,
(r2−rp) indicates the second distance between the second row of pixels r2 and the “pth” row of pixels rp.
Further, for one or more rows of pixels above the second row of pixels r2, a width of a corresponding line may be reduced. Hence, a width of a line corresponding to a “qth” row of pixels rq above the second row of pixels r2 may be estimated by utilizing a ninth equation (9) as shown below:
w
q
=w
2−2*(rq−r2)*cot θ (9)
where,
(rq−r2) indicates the second distance between the “qth” row of pixels rq and the second row of pixels r2.
Thus, for each of the remaining rows of pixels (i.e., the second plurality of rows of pixels) in the first image 304, the processor 108 may be configured to estimate the width of the corresponding line. In an embodiment, the processor 108 may be further configured to estimate the third distance of each remaining row of pixels from the vehicle 102 based on the corresponding estimated width, the known width W, and the focal length F. For example, the third distance ds of an “sth” row of pixels rs of the remaining rows of pixels from the vehicle 102 may be estimated by utilizing a tenth equation (10) as shown below:
where,
ws indicates the estimated width of a line corresponding to the “sth” row of pixels rs.
In an embodiment, based on the estimated distances, the processor 108 may be configured to store the first and second known distances d1 and d2 of the first and second rows of pixels r1 and r2, respectively, and the third distance of each remaining row of pixels as the distance data set in the memory 110. In another embodiment, the processor 108 may be configured to store the distance data set in the database server 122. The vehicle device 104 may utilize the distance data set to predict the first distance of the first object in the implementation phase i.e., in the real-time driving scenarios.
In the implementation phase, when the vehicle 102 is traversing the road, the image-capturing device 106 may be configured to continuously capture the one or more images of the various objects that are present in front of the vehicle 102. For example, the image-capturing device 106 may capture the second image of the first object on the road and transmit the second image to the processor 108.
The processor 108 may be configured to receive the second image from the image-capturing device 106 and process the second image to detect the first object in the second image. The processor 108 may be further configured to detect the first bottom edge of the first object in the second image. In an embodiment, the processor 108 may perform an object detection operation on the second image to detect the first object in the second image. Examples of the object detection may include a Haar based object detection, a histogram of oriented gradients (HOG) based object detection, an HOG and support vector machines (SVM) i.e., the HOG-SVM based object detection, deep learning based object detection (using a convolutional neural network (CNN) approach, a region-of-interest-CNN i.e., an R-CNN approach, a fast R-CNN approach, or a faster R-CNN approach), or any combination thereof. The object detection operation may output a first rectangular bounding-box (shown in
Upon detection of the first bottom edge, the processor 108 may be configured to identify the third row of pixels in the second image associated with the first bottom edge. In an embodiment, based on the third row of pixels, the processor 108 may be configured to retrieve the first distance value from the memory 110. In another embodiment, based on the third row of pixels, the processor 108 may transmit the query to the database server 122 to retrieve the first distance value. The first distance value may correspond to the fourth row of pixels in the first image 304 having the row number that is equal to the row number of the third row of pixels in the second image. Further, the processor 108 may predict the first distance of the first object from the vehicle 102 based on the first distance value. In an embodiment, the first distance may be a distance of the first object from a front edge of the vehicle 102. In some embodiments, the first distance may indicate a distance of the first object from the image-capturing device 106.
Further, the processor 108 may be configured to generate the warning message based on the first distance of the first object and communicate the warning message to the driver of the vehicle 102. For example, if the first distance is less than the threshold value, the processor 108 may generate the warning message indicating the impending collision of the vehicle 102 with the first object, and communicate the warning message to the driver for offering the driving assistance in real-time that may help to prevent the impending collision. In some embodiments, the processor 108 may generate the warning message based on the first distance and speed of the vehicle 102. The processor 108 may communicate the warning message to the driver by communicating an SMS, an audio message, a video message, a haptic message, or the like.
In some embodiments, other than the first object, the first image may include various other objects. Distances of the various other objects captured in the second image may be predicted by executing a process that is similar to the process for predicting the first distance of the first object from the vehicle 102. Further, although the disclosure describes use of a single image-capturing device (e.g., the image-capturing device 106), it will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the use of the single image-capturing device. In some embodiments, a plurality of image-capturing devices having same or different focal lengths may be utilized.
Although the disclosure describes the prediction of distances of the various objects in front of the vehicle 102, it will be apparent to a person skilled in the art that the scope of the disclosure is not limited to the prediction of distances of the various objects that are in front of the vehicle 102. In some embodiments, distances of various objects (that are behind or sideways to the vehicle 102) may also be predicted in the similar manner as described above. For predicting the distances of the various objects (that are behind the vehicle 102), a rear image-capturing device (not shown) may be installed on a rear side of the vehicle 102. Similarly, for predicting the distances of the various objects (that are sideways to the vehicle 102), one or more sideway image-capturing devices (not shown) may be installed on each side of the vehicle 102.
Further, the color model associated with the first image 304 may be the RGB color model. However, the separation of color (i.e., separation of the green color of the carpet 302 from other colors in the first image 304) may be more distinct in the HSV color model as compared to the RGB color model. Thus, the processor 108 may be configured to convert the first image 304 from the RGB color model into the HSV color model. The processor 108 may be further configured to filter the converted first image to distinctly obtain the green color sections (i.e., the sections 402a-402c) in the converted first image. The sections 402a-402c of green color in the first image 304 have been illustrated as sections 404a-404c of black color in the filtered first image 406 (as illustrated in
The processor 108 may be further configured to perform an edge detection operation on the filtered first image 406 to identify a set of lines 410a passing through the section 408a and a set of lines 410b passing through the section 408b. The sets of lines 410a and 410b are illustrated in
At 602, the first image 304 of the calibration system 300 is captured. In an embodiment, the image-capturing device 106 may be configured to capture the first image 304. The first image 304 may include the first and second calibration lines c1 and c2. The image-capturing device 106 may be configured to transmit the first image 304 (i.e., image data associated with the first image 304) to the processor 108.
At 604, the first and second rows of pixels r1 and r2 corresponding to the first and second calibration lines c1 and c2, respectively, are identified in the first image 304. In an embodiment, the processor 108 may be configured to identify the first and second rows of pixels r1 and r2 based on the first image 304. At 606, the focal length F of the image-capturing device 106 is estimated. In an embodiment, the processor 108 may be configured to estimate the focal length F of the image-capturing device 106 based on at least the first calibration line c1 or the second calibration c2. For example, the processor 108 may estimate the focal length F of the image-capturing device 106 based on the first known distance d1 and the known width W of the first calibration line c1, and the first observed width w1 (i.e., the width of the first calibration line as observed in the first image 304).
At 608, the width of the line corresponding to each remaining row of pixels in the first image 304 is estimated. In an embodiment, the processor 108 may be configured to estimate, for each remaining row of pixels in the first image 304, the width of the corresponding line based on the second distance between the corresponding row of pixels and the first or the second row of pixels r1 or r2, the first and second observed widths w1 and w2, and the first angle θ. The remaining rows of pixels in the first image 304 may correspond to the rows of pixels in the first image 304 apart from the first and second rows of pixels r1 and r2.
At 610, the third distance of each remaining row of pixels in the first image 304 from the vehicle 102 is estimated. In an embodiment, the processor 108 may be configured to estimate the third distance of each remaining row of pixels in the first image 304 from the vehicle 102 based on the known width W, the estimated width of the corresponding line, and the focal length F. Thus, each row of pixels in the first image 304 may have a corresponding distance from the vehicle 102 associated with it.
At 612, the distance data set is stored in the memory 110 or the database server 122. In an embodiment, the processor 108 may be configured to store the distance data set in the memory 110 or the database server 122. The distance data set may include the known distances of the first and second rows of pixels in the first image 304 and the estimated distance of each remaining row of pixels in the first image 304. Thus, the vehicle device 104 may be calibrated to predict distances of the various objects based on distance values included in the distance data set that may be stored in the memory 110 or the database server 122.
The implementation phase of the disclosure may correspond to the vehicle 102 traversing the road. At 614, the second image 500 of the first object (e.g., the objects 502a-502d) present on the road in front of the vehicle 102 is captured. In an embodiment, the image-capturing device 106 may be configured to capture the second image 500, as the vehicle 102 traverses the road, and transmit the second image 500 (i.e., image data associated with the second image 500) to the processor 108. The second image 500 includes the first object (e.g., the objects 502a-502d).
At 616, the first bottom edge of the first object is detected in the second image 500. In an embodiment, the processor 108 may be configured to detect the first bottom edge of the first object based on the second image 500. At 618, the third row of pixels in the second image 500 corresponding to the first bottom edge is identified. In an embodiment, the processor 108 may be configured to identify the third row of pixels in the second image 500 corresponding to the first bottom edge. At 620, the first distance value from the memory 110 or the database server 122 is retrieved. In an embodiment, the processor 108 may be configured to retrieve the first distance value from the memory 110 based on the third row of pixels. In another embodiment, based on the third row of pixels, the processor 108 may be configured to transmit the query to the database server 122 to retrieve the first distance value. The first distance value may correspond to the fourth row of pixels in the first image 304 whose row number is equal to the row number of the third row of pixels in the second image 500.
At 622, the first distance of the first object from the vehicle 102 is predicted. In an embodiment, the processor 108 may be configured to predict the first distance of the first object from the vehicle 102 based on the retrieved first distance value. At 624, the warning message is generated. In an embodiment, the processor 108 may be configured to generate the warning message based on the predicted first distance. For example, the processor 108 may generate the warning message when the first distance is less than the threshold value. At 626, the warning message is communicated to the driver of the vehicle 102. In an embodiment, the processor 108 may be configured to communicate the warning message to the driver of the vehicle 102 indicating the impending collision.
At 630, the first image 304 is converted from the RGB color model to the HSV color model. In an embodiment, the processor 108 may be configured to convert the first image 304 from the RGB color model to the HSV color model. At 632, the converted first image is filtered to obtain the green color associated with the carpet 302. In an embodiment, the processor 108 may be configured to filter the converted first image to obtain the green color associated with the carpet 302 of the calibration system 300. At 634, the first and second rows of pixels r1 and r2 corresponding to the first and second calibration lines c1 and c2, respectively, are identified from the filtered first image 406. In an embodiment, the processor 108 may be configured to identify the first and second rows of pixels r1 and r2 corresponding to the first and second calibration lines c1 and c2, respectively, from the filtered first image 406.
The computer system 700 may include a processor 702 that may be a special purpose or a general-purpose processing device. The processor 702 may be a single processor, multiple processors, or combinations thereof. The processor 702 may have one or more processor “cores”. Further, the processor 702 may be connected to a communication infrastructure 704, such as a bus, a bridge, a message queue, multi-core message-passing scheme, the communication network 124, or the like. The computer system 700 may further include a main memory 706 and a secondary memory 708. Examples of the main memory 706 may include RAM, ROM, and the like. The secondary memory 708 may include a hard disk drive or a removable storage drive (not shown), such as a floppy disk drive, a magnetic tape drive, a compact disc, an optical disk drive, a flash memory, or the like. Further, the removable storage drive may read from and/or write to a removable storage device in a manner known in the art. In an embodiment, the removable storage unit may be a non-transitory computer readable recording media
The computer system 700 may further include an input/output (I/O) port 710 and a communication interface 712. The I/O port 710 may include various input and output devices that are configured to communicate with the processor 702. Examples of the input devices may include a keyboard, a mouse, a joystick, a touchscreen, a microphone, and the like. Examples of the output devices may include a display screen, a speaker, headphones, and the like. The communication interface 712 may be configured to allow data to be transferred between the computer system 700 and various devices that are communicatively coupled to the computer system 700. Examples of the communication interface 712 may include a modem, a network interface, i.e., an Ethernet card, a communication port, and the like. Data transferred via the communication interface 712 may be signals, such as electronic, electromagnetic, optical, or other signals as will be apparent to a person skilled in the art. The signals may travel via a communications channel, such as the communication network 124, which may be configured to transmit the signals to the various devices that are communicatively coupled to the computer system 700. Examples of the communication channel may include a wired, wireless, and/or optical medium such as cable, fiber optics, a phone line, a cellular phone link, a radio frequency link, and the like. The main memory 706 and the secondary memory 708 may refer to non-transitory computer readable mediums that may provide data that enables the computer system 700 to implement the methods illustrated in
Various embodiments of the disclosure provide the vehicle device 104 for calibrating the fixed image-capturing device (such as the image-capturing device 106) of the vehicle 102. The vehicle device 104 may be configured to identify the first plurality of rows of pixels (such as the first and second rows of pixels r1 and r2) in the first image 304. The first image 304 may be captured by the image-capturing device 106. The first image 304 may include the plurality of calibration lines (such as the first and second calibration lines c1 and c2) that are at known distances (such as the first known distance d1 and the second known distance d2, respectively) from the image-capturing device 106. The first plurality of rows of pixels may correspond to the plurality of calibration lines. The vehicle device 104 may be further configured to estimate the focal length F of the image-capturing device 106. The focal length F may be estimated based on at least the first known distance d1 and the first width (such as the first observed width w1) of the first calibration line c1 in the first image 304. The vehicle device 104 may be further configured to estimate the third distance of each row of pixels of the second plurality of rows of pixels in the first image 304 from the image-capturing device 106. The third distance may be estimated based on at least the focal length F and the width (such as the third width w3) of the line (such as the third line) corresponding to each row of pixels. The third width w3 may be estimated based on at least the plurality of calibration lines and each row of pixels of the second plurality of rows of pixels. The first image may comprise the first plurality of rows of pixels and the second plurality of rows of pixels. The vehicle device 104 may be further configured to store the known distances of the first plurality of rows of pixels (i.e., the first and second known distances d1 and d2) and the estimated third distances of the second plurality of rows of pixels in the memory (such as the memory 110). Further, a distance of an object from another object may be predicted based on the stored distances and an image of the object.
Various embodiments of the disclosure provide the vehicle device 104 for predicting the first distance of the first object from the vehicle 102. In an embodiment, the image-capturing device 106 of the vehicle device 104 may be configured to capture the image (such as the second image 500) of the first object. The processor 108 of the vehicle device 104 may be configured to detect the first bottom edge of the first object based on the second image 500. The processor 108 may be further configured to identify the row of pixels (such as the third row of pixels) in the second image 500 corresponding to the detected bottom edge. The processor 108 may be further configured to predict the first distance of the first object from the vehicle 102 based on a distance value retrieved from the distance data set that may be stored in the memory 110 of the vehicle device 104 or a separate memory device installed in the vehicle 102. The distance value may be retrieved from the distance data set based on at least the third row of pixels. The distance data set may be estimated by executing one or more calibration operations. For example, the plurality of rows of pixels (such as first plurality of rows of pixels) in the image (such as the first image 304) including the plurality of calibration lines (such as the first and second calibration lines c1 and c2) may be identified. The first plurality of rows of pixels may correspond to the plurality of calibration lines. The first and second calibration lines c1 and c2 may be at first and second known distances d1 and d2 from an object (such as the vehicle 102), respectively.
The first plurality of rows of pixels may be identified by converting the first image 304 from a first color model to a second color model. The first or second color model may be at least one of a black and white color model, a greyscale color model, a CMYK color model, an HSB color model, an HSL color model, an HCV color model, or the like. The first color model may be different from the second color model. The identification of the first plurality of rows of pixels further includes filtering the converted first image to obtain a filtered first image (such as the filtered first image 406) including a known color. The first plurality of rows of pixels may be identified from the filtered first image 406. Further, the distance data set for the plurality of rows of pixels (such as the second plurality of rows of pixels) in the first image 304 may be estimated based on at least the first known distance d1, a width (such as the first observed width w1) of the first calibration line c1 in the first image 304, and the width (such as the third width w3) of the line (such as the third line) corresponding to each of the second plurality of rows of pixels. The third width w3 may be estimated based on at least the plurality of calibration lines and each row of pixels of the second plurality of rows of pixels. The distance data set may further include the first and second known distances d1 and d2. The first image 304 may comprise first plurality of rows of pixels and the second plurality of rows of pixels. The retrieved distance value may be associated with the fourth row of pixels in the first image 304 having a row number that is equal to a row number of the third row of pixels in the second image 500. Upon prediction of the first distance of the first object from the vehicle 102, the processor 108 may be configured to generate the warning message based on at least the predicted distance. The processor 108 may be further configured to communicate the warning message to the driver of the vehicle 102 indicating the impending collision.
Various embodiments of the disclosure provide a non-transitory computer readable medium having stored thereon, computer executable instructions, which when executed by a computer, cause the computer to execute operations for calibrating the fixed image-capturing device (such as the image-capturing device 106) of the vehicle 102. The operations include identifying, by the vehicle device 104, the first plurality of rows of pixels (such as the first and second rows of pixels r1 and r2) in the first image 304. The first image 304 may be captured by the image-capturing device 106. The first image 304 may include the plurality of calibration lines (such as the first and second calibration lines c1 and c2) that are at known distances (such as the first and second known distances d1 and d2, respectively) from the image-capturing device 106. The first plurality of rows of pixels may correspond to the plurality of calibration lines. The operations further include estimating, by the vehicle device 104, the focal length F of the image-capturing device 106 based on at least the first known distance d1 and the first width (such as the first observed width w1) of the first calibration line c1 in the first image 304. The operations further include estimating, by the vehicle device 104, the third distance of each row of pixels of the second plurality of rows of pixels in the first image 304 from the image-capturing device 106. The third distance may be estimated based on at least the focal length F and the width (such as the third width w3) of the line (such as the third line) corresponding to each row of pixels. The third width w3 may be estimated based on at least the plurality of calibration lines and each row of pixels of the second plurality of rows of pixels. The first image may comprise the first plurality of rows of pixels and the second plurality of rows of pixels. The operations further include storing, by the vehicle device 104, the first and second known distances d1 and d2 and the estimated third distances of the second plurality of rows of pixels in the memory (such as the memory 110). Further, a distance of an object from another object may be predicted based on the stored distances and an image of the object.
Various embodiments of the disclosure provide a non-transitory computer readable medium having stored thereon, computer executable instructions, which when executed by a computer, cause the computer to execute operations for predicting the first distance of the first object from the vehicle 102. The operations include capturing, by the image-capturing device 106 of the vehicle device 104, the image (such as the second image 500) of the first object. The operations further include detecting, by the processor 108 of the vehicle device 104, the first bottom edge of the first object based on the second image 500. The operations further include identifying, by the processor 108, the row of pixels (such as the third row of pixels) in the second image 500 corresponding to the detected bottom edge. The operations further include predicting, by the processor 108, the first distance of the first object from the vehicle 102 based on a distance value retrieved from the distance data set that may be stored in the memory 110 of the vehicle device 104 or a separate memory device installed in the vehicle 102. The distance value may be retrieved from the distance data set based on at least the third row of pixels. The distance data set may be estimated by executing one or more calibration operations. For example, the plurality of rows of pixels (such as first plurality of rows of pixels) in the image (such as the first image 304) including the plurality of calibration lines (such as the first and second calibration lines c1 and c2) may be identified. The first plurality of rows of pixels may correspond to the plurality of calibration lines. The first and second calibration lines c1 and c2 may be at the first and second known distances d1 and d2 from an object (such as the vehicle 102), respectively.
The first plurality of rows of pixels may be identified by converting the first image 304 from a first color model to a second color model. The first or second color model may be at least one of a black and white color model, a greyscale color model, a CMYK color model, an HSB color model, an HSL color model, an HCV color model, or the like. The first color model may be different from the second color model. The identification of the first plurality of rows of pixels further includes filtering the converted first image to obtain a filtered first image (such as the filtered first image 406) including a known color. The first plurality of rows of pixels may be identified based on the filtered first image 406. Further, the distance data set for the plurality of rows of pixels (such as the second plurality of rows of pixels) in the first image 304 may be estimated based on at least the first known distance d1, a width (such as the first observed width w1) of the first calibration line c1 in the first image 304, and the width (such as the third width w3) of the line (such as the third line) corresponding to each of the second plurality of rows of pixels. The third width w3 may be estimated based on at least the plurality of calibration lines and each row of pixels of the second plurality of rows of pixels. The distance data set may further include the first and second known distances d1 and d2. The first image 304 may comprise first plurality of rows of pixels and the second plurality of rows of pixels. The retrieved distance value may be associated with the fourth row of pixels in the first image 304 having a row number that is equal to a row number of the third row of pixels in the second image 500. Upon prediction of the first distance of the first object from the vehicle 102, the processor 108 may be configured to generate the warning message based on at least the predicted distance. The processor 108 may be further configured to communicate the warning message to the driver of the vehicle 102 indicating the impending collision.
The disclosed embodiments encompass numerous advantages. The disclosure provides various methods and systems for predicting the first distance of the first object from the vehicle 102 based on the distance data set that is estimated in the calibration phase. The first and second rows of pixels r1 and r2 are identified by way of line correspondences (i.e., a line (such as the first and second calibration lines c1 and c2) on the ground plane is mapped to a row of pixels in an image (such as the first image 304)). Hence, the accuracy of identification of the first and second rows of pixels r1 and r2 is higher as compared to conventional distance prediction approaches that use point correspondences. Further, the calibration of the distance prediction mechanism is performed using a single frame (i.e., the first image 304 of the calibration system 300), thereby eliminating a need to have multiple frames (i.e., images) of a calibration system (e.g., the calibration system 300) for calibration. Further, based on the determined distance data set, the methods and the systems facilitate predicting far-away objects (e.g., objects at distances greater than 10 meters) with high accuracy. Further, since the distances of the distance data set may be estimated based on the plurality of calibration lines of the calibration system 300, and the distances of various objects (such as the first object) may be predicted based on the distance data set, a need for knowing actual dimensions of the various objects beforehand for predicting distances from the vehicle 102 is eliminated. Thus, the method and the system of the present disclosure provide a more efficient, a more effective, and a more accurate way of predicting the first distance of the first object as compared to a conventional approach of distance prediction.
A person of ordinary skill in the art will appreciate that embodiments and exemplary scenarios of the disclosed subject matter may be practiced with various computer system configurations, including multi-core multiprocessor systems, minicomputers, mainframe computers, computers linked or clustered with distributed functions, as well as pervasive or miniature computers that may be embedded into virtually any device. Further, the operations may be described as a sequential process, however some of the operations may in fact be performed in parallel, concurrently, and/or in a distributed environment, and with program code stored locally or remotely for access by single or multiprocessor machines. In addition, in some embodiments, the order of operations may be rearranged without departing from the spirit of the disclosed subject matter.
Techniques consistent with the disclosure provide, among other features, systems and methods for predicting the first distance of the first object from the vehicle 102. While various exemplary embodiments of the disclosed systems and methods have been described above, it should be understood that they have been presented for purposes of example only, and not limitations. It is not exhaustive and does not limit the disclosure to the precise form disclosed. Modifications and variations are possible in light of the above teachings or may be acquired from practicing of the disclosure, without departing from the breadth or scope.
While various embodiments of the disclosure have been illustrated and described, it will be clear that the disclosure is not limited to these embodiments only. Numerous modifications, changes, variations, substitutions, and equivalents will be apparent to those skilled in the art, without departing from the spirit and scope of the disclosure, as described in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201941005109 | Feb 2019 | IN | national |