IMAGE PROCESSING METHOD AND APPARATUS
The present disclosure relates to a controller (2) for identifying a periphery of a towed vehicle (T) connected to a towing vehicle (V). The controller (2) is configured to receive towing vehicle image data (DV1) corresponding to a towing vehicle image (IMG1) captured by a towing vehicle camera (C1). The towing vehicle image data (DV1) is processed to generate a plurality of movement vector. The periphery (P1) of the towed vehicle (T) is identified in dependence on the plurality of movement vectors. The present disclosure also relates to a method of identifying the periphery (P1) of a towed vehicle (T).
The present disclosure relates to an image processing method and apparatus. In particular, but not exclusively, the present disclosure relates to a method and apparatus for identifying a target object in an image disposed on a vehicle.
BACKGROUNDIt is known to use cameras on a vehicle and to display images from those cameras to assist the driver. For example, it is known to provide a rear-facing camera in a bumper of the vehicle to facilitate parking the vehicle. The images can provide a useful source of additional information to the driver, for example to identify potential obstacles. In order to facilitate manoeuvring of a towed vehicle, such as a trailer, it is known to provide cameras on the towing vehicle and the trailer. A camera may, for example, be provided at the rear of the trailer to facilitate reversing the trailer. It is known from the Applicant's earlier application GB1414632.8 to combine images from a camera provided on the vehicle with images from a camera provided on the trailer. The resulting composite image may be output to provide a driver aid. The present invention(s) relates to developments and modifications of these types of display systems.
SUMMARY OF THE INVENTIONAspects of the present invention relate to a controller, a method and a non-transitory computer-readable medium as claimed in the appended claims.
According to a further aspect of the present invention there is provided a controller for identifying a periphery of a towed vehicle connected to a towing vehicle, the controller being configured to:
-
- receive towing vehicle image data corresponding to a towing vehicle image captured by a towing vehicle camera;
- process the towing vehicle image data to generate a plurality of movement vectors; and
- identify the periphery of the towed vehicle in dependence on the plurality of movement vectors. The controller generates movement vectors which may then used to differentiate between different features of the towing vehicle image. The periphery represents the external visible boundary (or edge) of the towed vehicle when viewed from the perspective of the vehicle mounted camera. By comparing the movement vectors, the periphery can be identified to facilitate processing, for example to facilitate blending with another image. At least in certain embodiments, the periphery can be identified automatically, thereby removing or reducing the need for the user to specify the boundary of the towed vehicle. A portion or sub-set of the towing vehicle image corresponding to the trailer may be selected based on the identified periphery of the towed vehicle. A trailer image component may be extracted, for example to be combined with image data from a separate source.
At least in certain embodiments, the controller may identify the periphery of the towed vehicle when the towing vehicle and the towed vehicle are both moving, Indeed, the movement vectors may enable the controller to differentiate between the towed vehicle and the background or surrounding features which move relative to each other when the towing vehicle and the towed vehicle are in motion. The controller may be configured to identify the periphery of the towed vehicle only when a reference speed of the vehicle is greater than or equal to a predefined speed threshold. Alternatively, the controller may be configured to identify the periphery of the towed vehicle only when an average magnitude of the movement vectors exceeds a predefined threshold.
The movement vectors may each comprise a magnitude. The movement vectors may each comprise a scalar value having x and y directional components (where x and y correspond to image axes). The x and y directional components may be combined to determine the magnitude of each movement vector.
The magnitude of the movement vectors may comprise an instant magnitude, for example determined at a predetermined time intervals. Alternatively, the magnitude of the movement vectors may be analysed with respect to time. For example, an average or mean magnitude may be determined with respect to time. The magnitude may comprise a temporal average magnitude. The controller may be configured to calculate a temporal average magnitude of each movement vector. The identification of the periphery of the towed vehicle may comprise comparing the magnitude of the plurality of movement vectors.
The controller may be configured to determine a gradient of the magnitude of the movement vectors. The gradient of the magnitude of the movement vectors represents a change in the magnitude relative to the distance between the sample locations. The distance between the sample locations may, for example, be measured in pixels within an image. By way of example, a first movement vector at a first coordinate (x1, y1) may have a first magnitude M1; and a second movement vector at a second co-ordinate (x2, y2) may have a second magnitude M2. The gradient of the magnitude in the x-direction would be (M2−M1)/(x2−x1); and the gradient of the magnitude in y-direction, (M2−M1)/(y2−y1). It will be understood, therefore, that the gradient of the magnitude of the movement vectors may define how the magnitude changes spatially over the image within a single image. The calculated gradient of the magnitude may be averaged over time. The controller may be configured to calculate a temporal average gradient. The periphery of the towed vehicle may be identified in dependence on the determined gradient. The determined gradient may be compared to a threshold to identify the periphery of the towed vehicle. Any determined gradient which is greater than the threshold may be considered as representing a significant boundary in the image, for example corresponding to a periphery of the towed vehicle. The threshold may be predefined or may be calculated dynamically.
The movement vectors may be generated for the entirety of the towing vehicle image.
The controller may be configured to apply a closing algorithm to close the identified periphery of the towed vehicle.
The controller may be configured to select a trailer image component of the towing vehicle image in dependence on the identified periphery of the towed vehicle.
The controller may be configured to receive trailer image data corresponding to a trailer image captured by a trailer camera. The controller may optionally overlay the trailer image component onto the trailer image.
The controller may be configured to receive trailer image data corresponding to a trailer image captured by a trailer camera. The controller may be configured to select a component of the towed vehicle image in dependence on the identified periphery of the towed vehicle. The obscured component may, for example, correspond to a region behind the towed vehicle which is obscured from view (from the perspective of the driver of the towing vehicle) by the towed vehicle. The controller may overlay the obscured component onto the towing vehicle image. The controller may optionally be configured to re-scaling the obscured component to allow for the longitudinal offset between the towing vehicle camera and the trailer camera. The transparency of the corresponding region of the towing vehicle image (i.e. the region identified as corresponding to the towed vehicle) may optionally be increased. By increasing the transparency such that the towing vehicle image is partially transparent, the trailer may be visible in the composite image, for example as a semi-transparent (“ghost”) image.
The controller may be configured to output a composite image generated in dependence on the combined towing vehicle image and the towed vehicle image. The composite image may, for example, be output to a display screen.
The controller may perform optical flow analysis of the towing vehicle image data to generate the movement vectors.
According to a further aspect of the present invention there is provided a method of identifying a periphery of a towed vehicle connected to a towing vehicle, the method comprising:
-
- receive towing vehicle image data corresponding to a towing vehicle image;
- generate a plurality of movement vectors for the towing vehicle image; and
- identify the periphery of the towed vehicle based on said movement vectors.
The method may comprise identifying the periphery of the towed vehicle only when a reference speed of the vehicle is greater than or equal to a predefined speed threshold. A reference speed may be received from a suitable speed sensor provided on the vehicle. Alternatively, the method may comprise identifying the periphery of the towed vehicle only when an average magnitude of the movement vectors exceeds a predefined threshold.
Each of the movement vectors may comprise a magnitude. The movement vectors may each comprise a scalar value having x and y directional components (where x and y correspond to image axes). The x and y directional components may be combined to determine the magnitude of each movement vector.
The magnitude of the movement vectors may comprise an instant magnitude determined at a particular time. Alternatively, the magnitude of the movement vectors may be analysed with respect to time. For example, an average or mean magnitude may be determined with respect to time. The magnitude may comprise a temporal average magnitude. The method may comprise calculating a temporal average magnitude of each movement vector. The method may comprise identifying the periphery of the towed vehicle comprises comparing the magnitude of the plurality of movement vectors.
The method may comprise determining a gradient of the magnitude of the movement vectors. The calculated gradient of the magnitude may be averaged over time. The method may comprise identifying the periphery of the towed vehicle in dependence on the determined gradient. The method may comprise comparing the determined gradient to a threshold to identify the periphery of the towed vehicle. Any determined gradient which is greater than the threshold may be considered as representing a significant boundary in the image, for example corresponding to a periphery of the towed vehicle. The threshold may be predefined or may be calculated dynamically.
The method may comprise generating the movement vectors for the entirety of the towing vehicle image.
The method may comprise applying a closing algorithm to close the identified periphery of the towed vehicle.
The method may comprise selecting a trailer image component of the towing vehicle image in dependence on the identified periphery of the towed vehicle. The method may comprise receiving trailer image data corresponding to a trailer image captured by a trailer camera. The method may comprise overlaying the trailer image component onto the trailer image.
The method may comprise receiving trailer image data corresponding to a trailer image captured by a trailer camera. The method may comprise selecting a component of the towed vehicle image in dependence on the identified periphery of the towed vehicle. The method may comprise overlaying the obscured component onto the towing vehicle image. The obscured component may, for example, correspond to a region behind the towed vehicle which is obscured from view (from the perspective of the driver of the towing vehicle) by the towed vehicle. The method may comprise overlaying the obscured component onto the towing vehicle image. The method may optionally comprise re-scaling the obscured component to allow for the longitudinal offset between the towing vehicle camera and the trailer camera. The transparency of the corresponding region of the towing vehicle image (i.e. the region identified as corresponding to the towed vehicle) may optionally be increased. By increasing the transparency such that the towing vehicle image is partially transparent, the trailer may be visible in the composite image, for example as a semi-transparent (“ghost”) image.
The method may comprise outputting a composite image generated in dependence on the combined towing vehicle image and the towed vehicle image.
The method may comprise performing optical flow analysis to generate the movement vectors for the towing vehicle image data.
According to a further aspect of the present invention, there is provided a non-transitory computer-readable medium having a set of instructions stored therein which, when executed, cause a processor to perform the method described herein.
Any control unit or controller described herein may suitably comprise a computational device having one or more electronic processors. The system may comprise a single control unit or electronic controller or alternatively different functions of the controller may be embodied in, or hosted in, different control units or controllers. As used herein the term “controller” or “control unit” will be understood to include both a single control unit or controller and a plurality of control units or controllers collectively operating to provide any stated control functionality. To configure a controller or control unit, a suitable set of instructions may be provided which, when executed, cause said control unit or computational device to implement the control techniques specified herein. The set of instructions may suitably be embedded in said one or more electronic processors. Alternatively, the set of instructions may be provided as software saved on one or more memory associated with said controller to be executed on said computational device. The control unit or controller may be implemented in software run on one or more processors. One or more other control unit or controller may be implemented in software run on one or more processors, optionally the same one or more processors as the first controller. Other suitable arrangements may also be used.
Within the scope of this application it is expressly intended that the various aspects, embodiments, examples and alternatives set out in the preceding paragraphs, in the claims and/or in the following description and drawings, and in particular the individual features thereof, may be taken independently or in any combination. That is, all embodiments and/or features of any embodiment can be combined in any way and/or combination, unless such features are incompatible. The applicant reserves the right to change any originally filed claim or file any new claim accordingly, including the right to amend any originally filed claim to depend from and/or incorporate any feature of any other claim although not originally claimed in that manner.
One or more embodiments of the present invention will now be described, by way of example only, with reference to the accompanying figures, in which:
A rear-view display system 1 in accordance with an embodiment of the present invention will now be described with reference to the accompanying figures. The rear-view display system 1 is intended for use in a towing vehicle V connected to a towed vehicle T. The towed vehicle T in the present embodiment comprises a trailer T. The towing vehicle V has a first longitudinal axis X1, and the trailer T has a second longitudinal axis X2.
As shown in
In the present embodiment, the controller 2 is disposed in the towing vehicle V. As shown in
The towing vehicle and trailer cameras C1, C2 are both rear-facing digital cameras for generating video images. The towing vehicle and trailer cameras C1, C2 each comprise a wide-angle lens to provide a viewing angle of approximately 180°. The towing vehicle camera C1 is mounted centrally at the rear of the towing vehicle V above a rear license plate (not shown) and, in the present embodiment, can selectively function as a reversing camera to provide a parking aid when there is no trailer T coupled to the towing vehicle V. The trailer camera C2 is mounted centrally at the rear of the trailer T. The towing vehicle and trailer cameras C1, C2 are arranged at approximately the same vertical height above ground level. In alternate arrangements, the towing vehicle and trailer cameras C1, C2 can be offset from each other in a vertical and/or transverse direction. The image processing module 6 can be configured to correct for any such positional offset. Equally, the image processing module 6 can be configured to correct for an angular offset between the towing vehicle and trailer cameras C1, C2, for example if one or both of the towing vehicle camera C1 and the trailer camera C2 are angularly offset from the respective first and second longitudinal axes X1, X2.
The towing vehicle camera C1 outputs a first signal S1 comprising said towing vehicle image data DV1 corresponding to the towing vehicle image IMG1. The first signal S1 is published to the communication bus 8 and provides a first input for the image processing module 6. The trailer camera C2 outputs said trailer image data DV2 corresponding to the trailer image IMG2. The second signal S2 is transmitted by the wireless transmitter 9 to the wireless receiver 5 to provide a second input for the image processing module 6. The wireless transmitter 9 can transmit the second signal S2 using a suitable wireless communication standard, such as Wi-Fi®. In a variant, the second signal S2 could be transmitted over a wired connection between the trailer T and the towing vehicle V.
The image processing module 6 is configured to combine a portion of the towing vehicle image data DV1 with the trailer image data DV2 to generate a composite image data DV3. As described herein, the image processing module 6 is configured to analyse the towing vehicle image IMG1 to identify a periphery P1 of the trailer T. The periphery P1 represents the external visible boundary (or edge) of the trailer T from the view point of the vehicle mounted camera C1. The region of the towing vehicle image IMG1 enclosed by the periphery P1 represents the trailer T and is referred to herein as the trailer image component TC1 (shown in
The image processing module 6 is configured to analyse the towing vehicle image data DV1 to detect a perimeter periphery P1 of the trailer T within the towing vehicle image IMG1. In the present embodiment, the image processing module 6 is configured to compute a dense optical flow between two or more frames of the towing vehicle image IMG1. The dense optical flow is calculated across the entire captured scene in the towing vehicle image IMG1. This analysis is performed when the towing vehicle V and the trailer T are moving. The image processing module 6 calculates optical flow vectors of pixels between two or more frames of the towing vehicle image IMG1, for example between consecutive frames. The optical flow vectors are calculated for pixels distributed regularly throughout the towing vehicle image IMG1, for example in a grid arrangement. The resulting optical flow vectors are distributed regularly across the entire frame. Other analysis techniques may be used to derive the optical flow vectors without departing from the scope of the present invention. When the towing vehicle V and the trailer T are moving, the optical flow vectors of pixels within a region of the towing vehicle image IMG1 corresponding to the trailer T have a relatively small magnitude (since movements of the trailer T relative to the towing vehicle V remain relatively low even when the towing vehicle V is in motion), and the optical flow vectors of pixels within a region of the towing vehicle image IMG1 corresponding to a region around the trailer T have a relatively large magnitude (since movements of background features are relatively high when the towing vehicle V is in motion).
The image processing module 6 seeks to identify a region in the towing vehicle image IMG1 where the optical flow vectors transition from having a relatively small magnitude to having a relatively high magnitude; this represents the periphery P1 of the trailer T. To perform this analysis, the image processing module 6 calculates the magnitude of the optical flow vectors within the towing vehicle image IMG1. In the present embodiment, the magnitude of the optical flow vectors is averaged with respect to time, for example over successive frames of the towing vehicle image IMG1. The calculation of the temporal average magnitude is performed across the entire scene captured in the towing vehicle image IMG1. A gradient of the magnitude of the optical flow vectors is then calculated across the towing vehicle image IMG1. The gradient of the magnitude of the optical flow vectors may be averaged over time. The gradient is calculated for motion vectors disposed proximal to each other to provide an indication of their movement relative to each other. The gradient provides a representation of the rate of change of the magnitude of the optical flow vectors spatially within vehicle trailer image IMG1. The gradient is directly proportional to the difference in the magnitude of the optical flow vectors and is greatest where the changes in the magnitude are most pronounced. The gradient is expected to be largest at the periphery P1 of the trailer T where pixels associated with a region of the towing vehicle image IMG1 relating to the trailer T (and having a relatively low movement) are disposed proximal to or adjacent to pixels associated with a region of the towing vehicle image IMG1 relating to the background (and having a relatively high movement). The image processing module 6 applies a predetermined threshold to the determined magnitudes to identify the periphery P1 of the trailer T. The identified periphery P1 may be incomplete, for example in regions where pixels are not identified in the towing vehicle image IMG1. The image processing module 6 completes the periphery P1, for example utilising a morphological closing technique, to form a closed region. The closed region is identified as the trailer image component TC1 of the towing vehicle image IMG1 corresponding to the trailer T. The technique described herein can be used to detect irregularly shaped objects and trailers T being towed by the towing vehicle T, without requiring that a region of interest is pre-defined in the image. The selection of the trailer image component TC1 may, therefore, be performed automatically.
The image processing module 6 may store a model of the trailer T comprising the periphery P1 and optionally also the image data contained therein (which represents the trailer T). The stored model may be used for detection in future utilisations of the rear-view display system 1. The stored model may be used subsequently to define the edge of the trailer T, for example when the towing vehicle V is moving at a speed less than the pre-defined speed threshold. The stored model may, for example, be used as an initial template until the towing vehicle speed is greater than or equal to the predefined speed threshold for calculating the periphery P1. Alternatively, or in addition, the stored model may be accessed by the image processing module 6 for use the next time the towing vehicle V is used to tow the trailer T.
It will be appreciated that the calculated gradient of the optical flow vectors will increase with vehicle speed, since this typically results in an increase in the magnitude of the optical vectors calculated for pixels relating to a background portion of the towing vehicle image IMG1. The image processing module 6 may be configured to identify the towing vehicle image IMG1 only when the towing vehicle speed is greater than or equal to a predefined speed threshold. In this arrangement, the image processing module 6 may be configured to receive a reference speed signal VREF, for example from the communication bus 8. The image processing module 6 may be configured to identify the periphery P1 only when the reference speed signal VREF identifies a towing vehicle speed greater than or equal to the predefined speed threshold. Rather than control the process in dependence on a determined vehicle speed, the image processing module 6 may detect the periphery P1 when the magnitude of one or more of the calculated optical flow vectors (or an average magnitude of the optical flow vectors over the entirety of the towing vehicle image IMG1) is greater than a predetermined threshold.
As described herein, the image processing module 6 combines the towing vehicle image data DV1 and the trailer image data DV2 to generate the composite image data DV3. When the towing vehicle V and the trailer T are aligned with each other (such that the first and second longitudinal axes X1, X2 are coincident), the first and trailer images IMG1, IMG2 are in respect of the same scene but may be offset from each other due to a longitudinal and/or vertical offset of the first and second cameras C1, C2. The image processing module 6 is configured to implement an image matching procedure to align the towing vehicle image IMG1 with the trailer image IMG2. The image processing module 6 may be configured to implement a cross-correlation technique automatically to match features common to both the towing vehicle image IMG1 and the trailer image IMG2. The image processing module 6 utilises the results of the cross-correlation to perform image registration such that the first and trailer images IMG1, IMG2 are aligned with each other. The image registration can comprise one or more of the following transforms: image rotation, scaling, cropping, magnification (zooming), skew correction and translation. The selected component TC2 of the trailer image IMG2 is then overlaid onto the towing vehicle image IMG1 to form the composite image IMG3 (for example using alpha-compositing techniques). The transparency of the selected trailer image component TC1 in the towing vehicle image IMG1 may optionally be increased. The resulting composite image IMG3 is output to a display screen 10 visible to a driver of the towing vehicle V, for example in a centre console or instrument cluster.
The operation of the rear-view display system 1 in accordance with an embodiment of the present invention will now be described with reference to
It will be understood that the profile of the identified periphery P1 may be updated dynamically at least substantially in real-time to reflect changes in the position and/or orientation of the trailer T relative to the vehicle V. As such, the selected trailer image component TC1 of the towing vehicle image IMG1 overlaid onto the trailer image IMG2 may be modified dynamically.
In the illustrated example, the towing vehicle V is an automobile (for example a sports utility vehicle) and the trailer T is a caravan. It will be appreciated, however, that the apparatus and method(s) described herein are not limited in this respect and could be implemented in other types and categories of vehicle and to other types of trailer. The apparatus and method(s) could, for example, be applied to an articulated vehicle, a semi-trailer or a tractor-trailer.
It will be appreciated that further changes and modifications can be made to the apparatus and method described herein without parting from the scope of the present invention.
The rear-view display system 1 described herein could be modified to combine the images from more than two cameras, for example to incorporate the images generated by one or more cameras mounted to a side of the towing vehicle V and/or the trailer T. The image processing module 6 may perform additional image processing, for example to apply a smoothing algorithm to the periphery P1. The identified periphery P1 could be overlaid directly onto the trailer image IMG1, for example to represent a silhouette or an outline of the trailer T.
The system 1 has been described herein with particular reference to combining the towing vehicle image IMG1 and the trailer image IMG2. However, it will be understood that the methods and apparatus described herein may be used in other applications on a towing vehicle V. For example, the same techniques may be used to form a composite image representing a region in front of the towing vehicle, for example to identify a portion of the bonnet and/or vender of the towing vehicle V to be overlaid as a semi-transparent image on top of an image a camera disposed on the front of the towing vehicle.
Claims
1. A controller for identifying a periphery of a towed vehicle connected to a towing vehicle, the controller being configured to:
- receive towing vehicle image data corresponding to a towing vehicle image captured by a towing vehicle camera;
- process the towing vehicle image data to generate a plurality of movement vectors; and
- identify the periphery of the towed vehicle based at least in part on the plurality of movement vectors.
2. A controller as claimed in claim 1, wherein the controller is further configured to identify the periphery of the towed vehicle only when a reference speed of the vehicle is either greater than or equal to a predefined speed threshold.
3. A controller as claimed in claim 1, wherein the controller is further configured to identify the periphery of the towed vehicle only when an average magnitude of the movement vectors exceeds a predefined threshold.
4. A controller as claimed in claim 1, wherein the controller is further configured to calculate a magnitude of each of the movement vectors.
5. A controller as claimed in claim 4, wherein the magnitude comprises a temporal average magnitude.
6. (canceled)
7. A controller as claimed in claim 5, wherein the controller is further configured to determine a gradient of the magnitude of the movement vectors.
8. A controller as claimed in claim 7, wherein the periphery of the towed vehicle is identified based at least in part on the determined gradient.
9. (canceled)
10. A controller as claimed in claim 1, wherein the movement vectors are generated for the entirety of the towing vehicle image.
11. A controller as claimed in claim 1, wherein the controller is further configured to apply a closing algorithm to close the identified periphery of the towed vehicle.
12. A controller as claimed in claim 1, wherein the controller is further configured to:
- receive trailer image data corresponding to a trailer image captured by a trailer camera; and
- select a component of the towed vehicle image based at least in part on the identified periphery of the towed vehicle.
13. A controller as claimed in claim 12, wherein the controller is further configured to:
- overlay the component onto the towing vehicle image.
14. A controller as claimed in claim 1, wherein the controller is further configured to perform an optical flow analysis of the towing vehicle image data to generate the movement vectors.
15. A method of identifying a periphery of a towed vehicle connected to a towing vehicle, the method comprising:
- receiving towing vehicle image data corresponding to a towing vehicle image;
- generating a plurality of movement vectors for the towing vehicle image; and
- identifying the periphery of the towed vehicle based at least in part on said movement vectors.
16. (canceled)
17. (canceled)
18. (canceled)
19. (canceled)
20. (canceled)
21. (canceled)
22. (canceled)
23. (canceled)
24. (canceled)
25. (canceled)
26. (canceled)
27. A non-transitory computer-readable medium having a set of instructions stored therein which, when executed, cause a processor to perform the method claimed in claim 15.
28. A controller as claimed in claim 5, wherein identifying the periphery of the towed vehicle comprises comparing the magnitude of the plurality of movement vectors.
29. A controller as claimed in claim 8, wherein the determined gradient is compared to a threshold to identify the periphery of the towed vehicle.
Type: Application
Filed: Jul 11, 2018
Publication Date: Sep 10, 2020
Patent Grant number: 11263758
Inventor: AARON FREEMAN-POWELL (Warwickshire)
Application Number: 16/648,193