Detection of coded light
TECHNICAL FIELD
The present disclosure relates to the detection of coded light by means of a camera having an image capture element that captures the light line-by-line, such as in a rolling-shutter camera.
BACKGROUND
Coded light refers to techniques whereby a signal is embedded in the visible light emitted by a light source such as an everyday luminaire. The light thus comprises both a visible illumination contribution for illuminating a target environment such as room
(typically the primary purpose of the light), and an embedded signal for providing information into the environment. To do this, the light is modulated at a certain modulation frequency or frequencies, preferably a high enough frequency so as to be beyond human perception and therefore not affecting the primary illumination function.
In some of the simplest cases, the signal may comprise a single waveform or even a single tone modulated into the light from a given luminaire. The light emitted by each of a plurality of luminaires may be modulated with a different respective modulation frequency that is unique amongst those luminaires, and the modulation frequency can then serve as an identifier of the luminaire or its light. For example this can be used in a commissioning phase to identify the contribution from each luminaire, or during operation can be used to identify a luminaire in order to control it remotely (e.g. via an RF back channel). In another example, the identification can be used for navigation or other location- based functionality, by mapping the identifier to a known location of a luminaire or information associated with the location.
In other cases, a signal comprising more complex data may be embedded in the light. For example using amplitude keying the amplitude of the light may be varied to encode data, e.g. using high and low levels to represent bits or using a more complex modulation scheme to represent different symbols. Or using frequency keying, a given luminaire is operable to emit on two (or more) different modulation frequencies and to
transmit data bits (or more generally symbols) by switching between the different modulation frequencies.
WO2012/127439 discloses a technique whereby coded light can be detected using an everyday "rolling shutter" type camera, as is often integrated into a mobile device like a mobile phone or tablet. In a rolling-shutter camera, the camera's image capture element is divided into a plurality of lines (typically horizontal lines, i.e. rows) which are exposed in sequence line-by-line. That is, to capture a given frame, first one line is exposed to the light in the target environment, then the next line in the sequence is exposed at a slightly later time, and so forth. Typically the sequence "rolls" in order across the frame, e.g. in rows top to bottom, hence the name "rolling shutter". When used to capture coded light, this means different lines within a frame capture the light at different times and therefore, if the line rate is high enough relative to the modulation frequency, at different phases of the modulation waveform. Thus the modulation in the light can be detected. SUMMARY
In case of rolling-shutter capture or the like, the effective detection bandwidth depends on the appearance of the coded light, or 'footprint', on the sensor. The effective detection bandwidth is maximized in the case where the light footprint covers as many image sensor lines as possible. In this case the detection time is minimized. Notably although ideally the light footprint is maximized, improvements in detection speed may already occur when the number of sensor lines that cover the light footprint is increased. This means when coded light is detected with the camera pointing at a relatively narrow and elongated luminaire such as a ceiling strip light, the orientation of the camera greatly influences the speed of detection. For instance this situation typically occurs when the front camera of a mobile device is being used. It would be desirable to invoke the user to rotate the camera device (e.g. a mobile phone) such that a more optimal orientation is achieved for detection of the coded light for every new situation. The desired user action can be invoked either by an explicit instruction, or (preferably) by an implicit aspect of the user interface (e.g. text orientation) such that the desired user action is achieved.
According to one aspect disclosed herein, there is provided a device
comprising a user interface, a camera, and a processing module; e.g. a portable device such as a smartphone or tablet. The camera is operable to capture an image of a scene comprising light from a light source, wherein the light from the light source is modulated with a coded light component. The camera comprises an image capture element which is divided into a
plurality of lines, whereby to capture the image the lines are exposed at different times in a sequence, e.g. as in a rolling-shutter camera. The processing module is configured to detect an orientation of the light source as projected onto the plane of the image capture element (i.e. as it appears or would appear in the captured image) relative to the lines of the image capture element, and based thereon to determine a target reorientation of the device which would be desired for a footprint of the light from the light source to cover an increased number of the lines in the image (and therefore an increased number of lines for detection of the coded light). The user interface is arranged to then output an indication of the target reorientation to the user, inducing the user to enact the target reorientation.
So for instance if the light source is a long, thin rectangular strip light and the lines are horizontal rows, the user will be induced to rotate his or her device so that the light source appears more vertically in the captured image, thereby covering more lines for coded light detection.
Preferably, the target reorientation is that required for the footprint to cover a maximum number of the lines (coverable by the footprint given the current distance of the device from the light source). Nonetheless, even if not the maximum, it may still be beneficial to induce a reorientation towards any increased number of lines relative to the current orientation.
In embodiments the user interface comprises a display, but the captured image is not required to be visible on said display.
In embodiments the user interface comprises a display and the indication of the target reorientation is output to the user via the display.
For example, the indication may comprise content of the display being rotated on the display so that proper (upright) viewing of the content requires the user to turn his or her device to the target reorientation. E.g. the indication may comprise text shown on the display, being oriented on the display such that to read the text upright requires the user to turn the device to said target reorientation; and/or a graphic on screen, being oriented on screen such that to view the graphic upright requires the user to turn the device to said target reorientation.
As another example, the indication may comprise an arrow on the display indicating which way to turn the device to obtain said target reorientation.
In a further example, the indication may comprise changing a colour and/or intensity on the display in dependence on a current orientation of the device relative to the target reorientation. E.g. the indication may comprise changing a colour of border pixels of
the display. For instance, the colour may be green to indicate the device being turned closer to said target reorientation, and red to indicate the device being turned farther from the target reorientation.
In yet another example, said indication may comprise displaying a metric measuring a current orientation of the device relative to the target orientation. E.g. the metric may represent a current number of lines of the image capture element covered by said footprint relative to a maximum number of lines coverable by the footprint at a current distance of the device from the light source.
The processing module preferably comprises an image processing module configured to perform said detection by detecting an orientation of the light source as appearing in the captured image relative to the lines of the image capture element, e.g. based on footprint recognition techniques for detecting coded light sources, and or one or more other image recognition techniques.
Alternatively or additionally however, the processing module may be configured to perform said detection based on an absolute orientation of the device measured using an orientation sensor, a position of the device measured using a positioning system, and a mapping between the position and predetermined knowledge of an absolute orientation of the light source; the processing module thus determining the relative orientation from the absolute orientation of the device compared with the absolute orientation of the light source .
According to another aspect disclosed herein, there is provided a method comprising: using a camera of a device to capture an image of a scene comprising light from a light source, wherein the light from the light source is modulated with a coded light component, and the camera comprises an image capture element divided into a plurality of lines whereby to capture the image the lines are exposed at different times in a sequence; detecting an orientation of the light source as projected onto the image capture element relative to the lines of the image capture element; based on said detection, determining a target reorientation of the device for a footprint of the light from the light source to cover an increased number of said lines in the image; and outputting an indication of said target reorientation to the user via a user interface of the device.
According to another aspect disclosed herein, there is provided a computer program product comprising code embodied on a computer-readable medium and configured so as when executed to perform corresponding operations of the device. E.g. the program may be stored on a server so as to be downloadable to the device, or stored on a local storage
of the device, or elsewhere; and may be executed on a (micro)processor of the device or more than one of multiple processors of the device if so equipped.
In embodiments, the method may further comprise steps or the computer program be further configured to perform operations in accordance with any of the device features disclosed herein.
BRIEF DESCRIPTION OF THE DRAWINGS
To assist the understanding of the present disclosure and to show how embodiments may be put into effect, reference is made by way of example to the
accompanying drawings in which:
Figure 1 schematically illustrates a space comprising a lighting system and camera,
Figure 2 is a schematic block diagram of a device with camera for receiving coded light,
Figure 3 schematically illustrates an image capture element of a rolling-shutter camera,
Figure 4 schematically illustrates the capture of modulated light by rolling shutter,
Figure 5 is a schematic representation of a capture image,
Figure 6 is another schematic representation of a captured image,
Figure 7 is another schematic representation of a captured image, Figure 8 is a schematic block diagram of an arrangement for processing captured images,
Figure 9 is a schematic representation of rotated content output via a user interface,
Figure 10 is a schematic representation of a metric output through a user interface, and
Figure 1 1 is another schematic representation of the metric of Figure 10. DETAILED DESCRIPTION OF EMBODIMENTS
Figure 1 shows an example environment 2 in which embodiments disclosed herein may be deployed. For instance the environment may comprise one or more rooms and/or corridors of an office, home, school, hospital, museum or other indoor space; or an outdoor space such as a park, street, stadium or such like; or another type of space such as a
gazebo or the interior of a vehicle. The environment 2 is installed with a lighting system comprising at least one lighting device 4 in the form a luminaire. Also present in the environment 2 is a user terminal 6, preferably a mobile device such as a smart phone or tablet. The luminaire 4 comprises a lighting element such an LED, array of LEDs, filament bulb or gas discharge lamp. The light emitted by the lighting element of each of the one or more luminaires is modulated with a coded light component at a frequency substantially
imperceptible to the human eye.
This may be accomplished by choosing a sufficiently high modulation frequency and by including measures to limit fluctuations in the frequency spectrum of the light output, e.g. as a result of data being modulated, below the critical flicker frequency of the human visual system. With regard to data dependent spectral components it is noted that the use of DC-free codes and/or DC -free codes may be particularly beneficial to limit low frequency components in the light output.
Figure 2 gives a block diagram of the mobile device 6. The device 6 comprises a user interface 8 (preferably a display such as a screen or touchscreen), a camera 10 having a two-dimensional image capture element 20, and an image analysis module 12 coupled to the image capture element 20 and user interface 8. The image analysis module 12 is operable to process signals representing images captured by the image capture element, and based thereon to decode coded light components in the light from which the image was captured. The image analysis module 12 may be implemented in the form of code stored on a computer readable storage medium or media and arranged to be executed on a processor comprising one or more processing units. Alternatively it is not excluded that some or all of the image analysis module 12 could be implemented in dedicated hardware circuitry or reconfigurable circuitry such as an FPGA.
Figure 3 represents the image capture element 20 of the camera 10. The image capture element 20 comprises an array of pixels for capturing signals representative of light incident on each pixel, e.g. typically a square or rectangular array of square or rectangular pixels. In a rolling-shutter camera, the pixels are arranged into a plurality of lines, e.g.
horizontal rows 22. To capture a frame each line is exposed in sequence, each for a
successive instance of the camera's exposure time Texp. In this case the exposure time is the duration of the exposure of an individual line. Note of course that in the context of a digital camera, the terminology "expose" or "exposure" does not refer to a mechanical shuttering or such like (from which the terminology historically originated), but rather the time when the line is actively being used to capture or sample the light from the environment. Note also that
a sequence in the present disclosure means a temporal sequence, i.e. so the exposure of each line starts at a slightly different time (and optionally the exposure of the lines may overlap in time). For example first the top row 221 begins to be exposed for duration Texp, then at a slightly later time the second row down 222 begins to exposed for Texp, then at a slightly later time again the third row down 223 begins to be exposed for Texp, and so forth until the bottom row has been exposed. This process is then repeated to expose a sequence of frames.
In WO2012/127439 for example, it has been described how coded light can be detected using a conventional video camera of this type. The signal detection exploits the rolling shutter image capture, which causes temporal light modulations to translate to spatial intensity variations over successive image rows.
This is illustrated schematically Figure 4. As each successive line 22 is exposed, it is exposed at a slightly different time and therefore (if the line rate is high enough compared to the modulation frequency) at a slightly different phase of the modulation. Thus each line 22 is exposed to a respective instantaneous level of the modulated light. This results in a pattern of stripes which undulates or cycles with the modulation over a given frame. Based on this principle, the image analysis module 14 is able to detect coded light components modulated into light received by the camera 10.
As an alternative to the use of a single photodetector, the use of a rolling- shutter camera to detect coded light poses various advantages. One such advantage is the spatial separation of different light sources in the image plane, allowing the simultaneous identification of multiple light sources and separation of their light distribution (their "footprint") over the illuminated scene.
For instance EP 2,503,852 describes how rolling-shutter type techniques can be used not only to detect the identity or data signalled by the coded light component, but also the spatial footprint of an individual coded light component in the case where there are multiple coded light components present in the environment from different luminaires. That is, the magnitude of the individual component can be determined as a function of spatial coordinates within the captured image, e.g. as a function of Cartesian x and y pixel coordinates, separated from amongst the contribution from the other component or components.
For coded light detection, the particular use of cameras with a rolling-shutter image sensor also has an advantage over global-shutter readout (where a whole frame is exposed at once) in that the different time instances of consecutive sensor lines causes fast light modulations to translate to spatial patterns as discussed in relation to Figure 4. However
unlike shown in Figure 4, the light (or at least the useable light) from a given light source 4 does not necessarily cover the area of the whole image capture element 20, but rather only a certain footprint. As a consequence, the shorter the vertical spread of a captured light footprint, the longer the duration over which the coded light signal is detectable. In practice, this means only a temporal fragment of the entire coded light signal can be captured within a single frame, such that multiple frames are required in order to capture sufficient shifted signal fragments to recover the data embedded in the coded light. The smaller the signal fragment in each frame, the more captured frames are necessary before data recovery is possible.
Coded light can be detected either by pointing the camera 10 at the light source or by pointing the camera at an illuminated surface. By using the front camera of a mobile device 6, coded light can be detected while keeping a free view on the display of the mobile device. For instance, this enables the mobile device 6 to be used as part of the lighting installation phase (e.g. commissioning). Alternatively or additionally, after installation, the mobile device 6 can quickly recover lamp specific identifiers embedded in the coded light to provide a range of services to the end user, based on his or her location in the building. E.g. such a location-based service can be used for indoor navigation, and/or the personalized control of the local illumination by adjusting the luminaire that is recognized by the ID embedded in the coded light (the control being via a suitable back-channel, e.g. RF).
A common situation in large public spaces, such as offices, shops and airports, is the use of long rows of narrow luminaires that are mounted in the ceiling. Even in the case of LED illumination, the linear shape of luminaires often corresponds to the fluorescent luminaires (TL-tubes), for which such LED luminaires often form a replacement.
The effective detection bandwidth of coded light detection with a rolling- shutter camera is determined by the number of sensor lines over which the coded light signal is present. This means that time required for data recovery strongly depends on the orientation of the mobile device 6 with respect to the long axis of the luminaire 4 (assuming the camera 10 is part of the mobile device 6 and therefore moves with it). If a narrow luminaire 4 appears with its long axis parallel to the lines of the image sensor 20, detection times may become very long. In extreme cases detection may not be possible at all.
Figures 5 to 7 show three typical cases of the appearance of an elongated ceiling luminaire as observed by a front facing camera 10 of a mobile device 6, i.e. as projected onto the plane of the image capture element 20. The arrows indicate the vertical extent of the luminous area in the camera frame. Figure 5 shows the least beneficial situation
for the detection of coded light. Rotation of the device as in Figure 6, or optimally as in Figure 7, improves the vertical extent over which the coded light signal or signal fragment is captured.
It would be desirable to enable or improve coded light detection in cases where the image of the light source 4 appears parallel (e.g. horizontal) or at a shallow angle relative to the lines 22 (e.g. rows) of the image capture element 20. According to the following, this is achieved by detecting the relative orientation between the image of the light source 4 and the lines 22, and computing a desired reorientation of the device 6 (assuming the camera 10 is part of the device 6 and so moves with it) such that the image of the light source 4 appears with a steeper angle relative to the lines 22 of the image capture element 20, preferably at right angles (e.g. vertical) to the lines 22 (e.g. rows). An indication of the target reorientation is output to the user interface 8 (preferably a screen), designed to cause the user to rotate his mobile device towards a more beneficial orientation with respect to the luminaire(s).
Figure 8 gives a schematic view of a mobile device 6, configured in accordance with embodiments of the present disclosure. Functional blocks are indicated with rectangular blocks, and relevant elements of the information stream are indicated with rounded blocks.
The device 6 is preferably a mobile device such as a tablet or smartphone. As discussed in relation to Figure 2, it comprises an embedded camera 10 (preferably front- facing camera), a user interface 8 that can be a display with information and controls (e.g. a touchscreen), and a processing module 12 (e.g. which may be implemented on an embedded memory and microprocessor of the device 6). The processing module 12 comprises a subsystem or algorithm to determine the orientation of a light source or the orientation of an illuminated area with respect to the camera 10, as well as a means to change an aspect of the user interface 8 in a way that implicitly or explicitly suggests to the user that he or she rotates the device to an orientation that optimizes the detection of coded light. Preferably the user interface does not require the camera image to be visible on the display 8.
As shown in Figure 8, the processing module 12 of the device 6 comprises an orientation determination block 32 and a comparison block 38. The orientation determination block 32 is arranged to receive an image stream 30 from the image capture element 20 of the camera 10, the stream 30 comprising the captured image data of one or more images of the environment 2, including an image of the light source 4 in at least one of the captured images. The orientation determination block 32 comprises a footprint recognition block configured to
recognise a footprint of the light source 4 in the captured image, for example using techniques as disclosed in EP 2,503,852. Based on this, the orientation determination block 32 determines a current orientation of the light source 4 as it appears in the captured image, e.g. as shown in Figures 5, 6 and 7. The orientation determination block 32 then outputs a first signal 34 representing this current orientation to the comparison block 38.
Alternatively or additionally, the relative orientation may be determined in another manner. For example, the orientation determination block 32 may be configured to obtain the orientation of the mobile device 6 from an orientation sensor, and to combine this with location information derived from a positioning system in order to determine the relative orientation between the device 6 and the luminaire 4. For example the orientation sensor may comprise a compass, gyro sensor(s) and/or accelerator(s) integrated into the mobile device 6, while the positioning system may comprise a satellite-based positioning system (e.g. GPS, GLONASS or Galileo) or a local RF communication network (e.g. using triangulation, trilateration or multilateration based on signals transmitted between the mobile device 6 and wireless nodes of the network). The orientation sensor provides the orientation of the device 6 with respect to the world (provided that the signal is reliable), and the information received from the positioning system gives the device's location in the world. Given access to a suitable lighting database (either stored locally on the device 6 or accessed remotely, e.g. over a network), this may enable the orientation determination block 32 to look up what luminaire(s) 4 are present at the current location and their "absolute" orientation, e.g. relative to a map, floor-plan or 3D model of the environment. Knowing also the orientation of the mobile device 6 relative to the map, floor-plan or model (from the orientation sensor), the orientation determination block 32 can thus determine the relative orientation of the device 6 and luminaire 4, and thus the orientation of the luminaire 4 as it would appear in the captured image. For example, the location information may be mapped to a certain shop, and the database may record the local orientation of the luminaires, which is generally unidirectional throughout the entire shop space.
Thus given the options above, in various embodiments the orientation of the mobile device 8 may be determined from footprint recognition based solely on the image captured by the camera, or without the camera based on an orientation sensor and positioning system; or information from both techniques could be combined in the determination of the orientation.
Either way, the comparison bock 38 also retrieves a second signal 36 representing a desired orientation for the light source 4 as it would appear in the captured
image. E.g. the comparison block 38 retrieves pre-programmed knowledge that vertical orientation is desired (in the case of horizontal lines 22). The comparison block 38 then compares these two signals 36, 38 to determine an indication 40 of a preferred reorientation of the device 6 which it outputs via the user interface 8.
In embodiments, the indication 40 is implemented by determining a required user interface (UI) orientation for the user interface 8, whereby that content is displayed on the UI 8 with an orientation such that for proper (upright) reading the user has to rotate his or her phone or tablet to the direction most beneficial for coded light detection. Thus the user is implicitly invoked to perform the reorientation. For example text on the device's display is oriented such that for proper reading the smartphone 6 needs to be rotated in the direction for optimal (or at least improved) coded light detection. As another example, the orientation of a graphic (e.g. photo or drawing) in the device's display is such that for proper viewing the smartphone needs to be rotated in the direction more beneficial for coded light detection. E.g. this graphic may comprise a company logo, an interactive control such as a slider that is adjusted by interaction with the touch screen, and/or an image that the user is intrigued to examine.
For instance see Figure 9. Here the content comprises a picture of a cat 44 and/or some text 42, but rotated to an angle. Without necessarily even thinking, the user finds him or herself wishing to admire the cat 44 or read the text 42 and instinctively rotates the device such that the content is displayed upright. The angle the device 6 is now held at is the optimal angle for coded light detection.
In another embodiment, the user interface content may be rotated, but text giving a message to rotate the device is displayed upright (and may be kept upright while the device 6 rotates) such that the user of the device 6 sees an instruction to rotate in a legible manner. The text may be removed once the device 6 has been rotated to the optimal orientation.
In another embodiment, an arrow on the display 8 indicates the optimal orientation for coded light detection.
In another embodiment, a colour indicates to what extent the orientation for coded light detection is optimal. A possible implementation is to use a coloured border of which the colour changes from red to green, depending on the orientation of the luminaires.
In yet another embodiment, the indication could be an explicit metric displayed to the user, quantifying the preferred orientation relative to the current orientation of the device. For instance the metric may measure the ratio or proportion of the number of
lines 22 that the light source 4 occupies at present in relation to an estimated maximum number of lines 22 that the light source can potentially occupy if the device is rotated to the optimal position, and/or the metric may measure a number of degrees through which the device 6 should be turned on one or more axes. This metric could be displayed to the user numerically or graphically, e.g. as a position or extent on a graphical scale. To the end user, the metric would preferably be presented graphically, e.g. in the form of a circle sector that spans the range between the current and desired orientation angle. E.g. Figures 10 and 1 1 show an example of a circle sector to indicate the difference between a less optimal orientation and an almost optimal orientation of the device. A second indicator represents the relative detection speed as a percentage of a maximal expected detection speed.
It will be appreciated that the above embodiments have been described by way of example only.
For instance, the scope of the disclosed techniques is not limited to the example indications of the target orientation discussed above, and other indications may be used, or any combination of the above indications and/or others. Generally, the target reorientation may be expressed in any form, and may be expressed in terms of a target change in orientation or an absolute orientation to be targeted.
Further, although above it has been described that the processing module 12 decodes the coded light as well as computing the target reorientation, this need not be the case in all possible embodiments. Alternatively or additionally, the processing module 12 on the device 6 may perform the operations for determining the target reorientation of the device 6, and the captured image may be passed to another terminal for extracting the coded light signal. For example the processing module 12 may store the image (e.g. locally or by uploading to a host computer or server), so that the coded light can be decoded from the stored image on a later occasion.
Further, the disclosed techniques can be used in conjunction with a number of different applications of coded light. Coded light adds information to the light source as well as the illuminated environment, and detection with existing (mobile) cameras adds value to the light source as the embedded information becomes available for various new applications. For example the lamp specific information can be used during commissioning of new lighting systems, and/or provide personalized local control over the light with a smartphone or tablet. As another example, a collection of coded-light enabled luminaires may provide a dense mesh of light beacons for indoor navigation and location-based services adding value to consumer and bringing accurate location information to the service provider. As yet
another example, coded-light illumination of a specific object can essentially 'tag' an object with the embedded identifier embedded in the light. The disclosed techniques can potentially add robustness to any of these applications.
It will be appreciated that the invention also applies to computer programs, particularly computer programs on or in a carrier, adapted to put the invention into practice. The program may be in the form of a source code, an object code, a code intermediate source and an object code such as in a partially compiled form, or in any other form suitable for use in the implementation of the method according to the invention.
Another embodiment relating to a computer program product comprises computer-executable instructions corresponding to each means of at least one of the systems and/or products set forth herein. These instructions may be sub-divided into sub-routines and/or stored in one or more files that may be linked statically or dynamically.
As stipulated above the invention may further be embodied in the form of a computer program product. When provided on a carrier, the carrier of a computer program may be any entity or device capable of carrying the program. For example, the carrier may include a storage medium, such as a ROM, for example, a CD ROM or a semiconductor ROM, or a magnetic recording medium, for example, a hard disk. Alternatively, the carrier may be an integrated circuit in which the program is embedded, the integrated circuit being adapted to perform, or used in the performance of, the relevant method.
Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite article "a" or "an" does not exclude a plurality. A single processor or other unit may fulfil the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. A computer program may be stored/distributed on a suitable medium, such as an optical storage medium or a solid-state medium supplied together with or as part of other hardware, but may also be distributed in other forms, such as via the Internet or other wired or wireless telecommunication systems. Any reference signs in the claims should not be construed as limiting the scope.