Method and device for identifying flashing light source

Information

  • Patent Grant
  • 10895799
  • Patent Number
    10,895,799
  • Date Filed
    Monday, December 24, 2018
    5 years ago
  • Date Issued
    Tuesday, January 19, 2021
    3 years ago
Abstract
The present disclosure provides a method and device for identifying a flashing light source. The method includes as follows. A processor obtains an image captured via a rolling shutter image sensor, the rolling shutter image sensor capturing an image of an environmental background, wherein the environmental background may include movable flashing light sources. A processor obtains stripe sets in the image, wherein the stripe sets can be obtained by capturing the flashing light sources via the rolling shutter image sensor. A processor takes a center of each stripe set as a reference point, and samples along a first direction to obtain n sampling points. A processor identifies the flashing light source by processing the n sampling points. With this disclosure, the identifying automatically of the flashing light source can be achieved.
Description
TECHNICAL FIELD

The present disclosure relates to the field of virtual technology, and more particularly, to a method and device for identity flashing light source.


BACKGROUND

With the development of technology of human-machine interaction, using moving object such as swinging gesture to input instructions, to replace means of direct contact with computer device, has become a trend. And then, tracking human gestures or other object motion states has become a problem that needs to be solved. A motion tracking system can capture images of light sources on moving objects by means of image processing, identify the moving objects according to the characteristics of the light sources, and then realize tracking of the moving objects. However, it is still a technical problem to identify the light source according to the stripe image formed by the light source.


SUMMARY

In order to identify flashing light source automatically, the embodiments of the present disclosure provide a method and a device for identifying a flashing light source.


In a first aspect, the present disclosure provides a method for identifying flashing light source. The method may include the following. A processor obtains an image captured via a rolling shutter image sensor, the rolling shutter image sensor capturing an image of an environmental background, wherein the environmental background may include flashing light sources, and the flashing light sources may be movable. A processor obtains stripe sets in the image, wherein the stripe sets can be obtained by capturing the flashing light sources via the rolling shutter image sensor. A processor takes a center of each stripe set as a reference point, and samples along a first direction to obtain n sampling points (d1, d2, . . . , dn). A processor identifies the flashing light source by processing the n sampling points (d1, d2, . . . , dn).


Combining the first aspect, in some embodiments, the first direction may be a direction perpendicular to an extending direction of stripes in the stripe set.


Combining any of the above embodiments of the first aspect, in some embodiments, a processor extends the n sampling points (d1, d2, . . . , dn) periodically to obtain N calculation, points, wherein N is greater than n.


Combining any of the above embodiments of the first aspect, in some embodiments, a processor transforms the N calculation points to frequency domain to obtain frequency domain data, and identifies the flashing light source according to the frequency domain data.


Combining any of the above embodiments of the first aspect, in some embodiments, a coordinate system can be established, the origin of the coordinate system may be the position of the top left pixel of the image, the positive direction of the x-axis may be the rightward direction of the image, and the positive direction of the y-axis may be the downward direction of the image. The center (u0, v0) of each stripe set can be obtained after establishing the coordinate system.


Combining any of the above embodiments of the first aspect, in some embodiments, n sampling points (d1, d2, . . . , dn) may be extended periodically, and the period may be k cycles, thus N calculation points






[



(


d
1

,

d
2

,





,

d
n


)

,

(


d
1

,

d
2

,





,

d
n


)

,








(


d
1

,

d
2

,





,

d
n


)






k





cycles



]





may be obtained, wherein, N is equal to n multiply (k−1) and plus m, m is less than or equal to n.


Combining any of the above embodiments of the first aspect, in some embodiments, when the first direction is a direction parallel to the width of the image and the center of the stripe set is taken as the reference point of the first direction, the processor can obtain n sampling points






{



d
1

=

(


u
0

,


v
0

-

n
2



)


,


d
2

=

(


u
0

,


v
0

-


n
-
1

2



)


,





,


d
n

=

(


u
0

,


v
0

+


n
-
1

2



)



}





by sampling along the first direction. In some embodiments, when the first direction is a direction perpendicular to the width of the image and the center of the stripe set is taken as the reference point of the first direction, the processor can obtain n sampling points






{



d
1

=

(



u
0

-

n
2


,

v
0


)


,


d
2

=

(



u
0

-


n
-
1

2


,

v
0


)


,





,


d
n

=

(



u
0

+


n
-
1

2


,

v
0


)



}





by sampling along the first direction.


Combining any of the above embodiments of the first aspect, in some embodiments, the center of the stripe set may be a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.


Combining any of the above embodiments of the first aspect, in some embodiments, the frequency domain data may be a combination of any one or more of amplitude data, energy data, and phase data.


In a second aspect, the present disclosure provides a device for identifying flashing light source. The device may include an obtaining module, a sampling module, and a processing module. The obtaining module may be configured to obtain an image via a rolling shutter image sensor capturing an image of an environmental background, wherein the environmental background may include flashing light sources, and the flashing light sources may be movable; and configured to obtain stripe sets in the image, wherein the stripe sets can be obtained by capturing the flashing light sources via the rolling shutter image sensor. The sampling module may be configured to take a center of each stripe set as a reference point, and sample along a first direction to obtain n sampling points (d1, d2, . . . , dn). The processing module may be configured to process the n sampling points (d1, d2, . . . , dn) to identify the flashing light source.


Combining the second aspect, in some embodiments, the first direction may be a direction perpendicular to an extending direction of stripes in the stripe set.


Combining any of the above embodiments of the second aspect, in some embodiments, the processing module may include an extending unit. The extending unit may be configured to extend the n sampling points (d1, d2, . . . , dn) periodically to obtain N calculation points, wherein N is greater than n.


Combining any of the above embodiments of the second aspect, in some embodiments, the processing module may further include a transforming unit. The transforming unit may be configured to transform frequency domain for the N calculation points to obtain frequency domain data, and identify the flashing light source according to the frequency domain data.


Combining any of the above embodiments of the second aspect, in some embodiments, a coordinate system can be established, the origin of the coordinate system may be the position of the top left pixel of the image, the positive direction of the x-axis may be the rightward direction of the image, and the positive direction of the y-axis may be the downward direction of the image. The center (u0, v0) of each stripe set can be obtained after establishing the coordinate system.


Combining any of the above embodiments of the second aspect, in some embodiments, the extending unit may be configured to extend the a sampling points (d1, d2, . . . , dn) periodically, and the period may be k cycles, to obtain N calculation points







[



(


d
1

,

d
2

,





,

d
n


)

,

(


d
1

,

d
2

,





,

d
n


)

,








(


d
1

,

d
2

,





,

d
n


)






k





cycles



]

,





wherein, N is equal to n multiply (k−1) and plus m, m is less than or equal to n.


Combining any of the above embodiments of the second aspect, in some embodiments, the sampling module may be configured to take the center of the stripe set as the reference point of the first direction, and sample along the first direction to obtain n sampling points







{



d
1

=

(


u
0

,


v
0

-

n
2



)


,


d
2

=

(


u
0

,


v
0

-


n
-
1

2



)


,





,


d
n

=

(


u
0

,


v
0

+


n
-
1

2



)



}

.





In some embodiments, when the first direction is a direction perpendicular to the width of the image, the sampling module may be configured to take the center of the stripe set as the reference point of the first direction, and sample along the first direction to obtain n sampling points







{



d
1

=

(



u
0

-

n
2


,

v
0


)


,


d
2

=

(



u
0

-


n
-
1

2


,

v
0


)


,





,


d
n

=

(



u
0

+


n
-
1

2


,

v
0


)



}

.




Combining any of the above embodiments of the second aspect, in some embodiments, the center of the stripe set may be a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.


Combining any of the above embodiments of the second aspect, in some embodiments, the frequency domain data may be a combination of any one or more of amplitude data, energy data, and phase data.


In a third aspect, the present disclosure provides a device. The device may include a processor, and a memory. The memory may store executable program code. The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, to execute the method for identifying a flashing light source. Wherein, the method is the method as described in the first aspect.


In a forth aspect, the present disclosure provides a medium. The medium may be configured to store an application, and the application may be configured to execute the method for identifying a flashing light source provided in the first aspect.


In a fifth aspect, the present disclosure provides an application. The application is configured to execute the method for identifying a flashing light source provided in the first aspect.


The embodiments of the present disclosure obtain stripe sets in the image, and sample along the first direction to obtain n sampling points (d1, d2, . . . , dn) by taking a center of the stripe set as a reference point. The flashing light source can be identified by processing the n sampling points (d1, d2, . . . , dn). The method in the above embodiments can identify the flashing light source automatically, and solves the problem of identifying automatically of the flashing light source which is hoped to be solved but has not been solved.





BRIEF DESCRIPTION OF THE DRAWINGS

In order to more Clearly illustrate the embodiments of the present disclosure, the drawings used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to the drawings without any creative work.



FIG. 1 illustrates a flow chart showing a method for identifying flashing light source according to embodiments of the disclosure.



FIG. 2 illustrates a schematic view of a flashing light source set in a method for identifying flashing light source according to embodiments of the present disclosure.



FIG. 3 is a waveform view after a sampling point period extension in a method for identifying flashing light source according to embodiments of the present disclosure.



FIG. 4 is a waveform view after a waveform of FIG. 3 frequency domain transform according to embodiments of the present disclosure.



FIG. 5 illustrates a schematic view of a device for identifying flashing light source according to embodiments of the present disclosure.



FIG. 6 illustrates a schematic view of a terminal according to embodiments of the present disclosure.





DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The technical solutions in the embodiments of the present disclosure will be clearly and completely described in the following with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.



FIG. 1 is a flow chart schematically illustrating a method for identifying a flashing light source according to an embodiment of the present disclosure. As illustrated in FIG. 1, the method for identifying a light source includes the flowing blocks.


At block 110, a processor obtains an image captured via a rolling shutter image sensor, the rolling shutter image sensor configured to capture an image of environmental background, wherein the environmental background can include flashing light sources, and the flashing light sources can be movable, stripe sets can be obtained by capturing the flashing light sources via the rolling shutter image sensor.


The rolling shutter image sensor may be an image sensor with a rolling shutter, such as, a Complementary Metal Oxide Semiconductor (CMOS) sensor includes an electronic rolling shutter, a Charge Coupling Element (CCD) sensor includes a rolling shutter, or the like.


The flashing light source may have a relatively stable flashing frequency or a changing flashing frequency, for example, an LED or the like. By controlling the duty cycle of the power input to the LED, it is possible to control the LED flashing at a fixed frequency or a non-fixed frequency, wherein the flashing frequency of the flashing light source is greater than the scanning frequency of the rolling shutter image sensor.


The flashing light source can be captured by the rolling shutter image sensor, and a pattern of alternating dark/white stripes can be formed in the horizontal direction of the image. As shown in FIG. 2, a stripe set 211 with alternating dark/white stripes may appear in the image after scanning the flashing light source by the rolling shutter image sensor. Specifically, if the flashing light source is “on”, when the rolling shutter image sensor scans the flashing light source, a white stripe corresponding to the flashing light source may appear in the image. If the flashing light source is “off”, when the rolling shutter image sensor scans the flashing light source, a dark stripe corresponding to the flashing light source may appear in the image. In general, the stripe set in the image may include a pattern of alternating dark/white stripes formed by exposing the flashing light source.


For easy discussion and illustration, the white stripes will be used to as an example in the following description. The shape of the outline of the stripe set in the image is related to the shape of the flashing light source. For example, if the shape of the flashing light source is circular, the stripe set may include a plurality of white stripes with different lengths, and the outline of the stripe set is circular. If the shape of the light source is rectangular, the stripe set may include some white stripes with same length, and the outline of the stripe set is rectangular. The width of the white stripes in the stripe set are related to the flashing period of the flashing light source, for example, the longer flashing period of the flashing light source may produce the wider width of the white stripes. Under extreme conditions, if the flashing period of the flashing light source is infinite, the flashing light source will form an all-bright spot on the image without stripes.


In some embodiments, the movable light source in the environmental background is identified by the rolling shutter image sensor in a stationary or moving state. Different from the identified of stationary objects, it has a good tracking effect in tracking and identifying moving targets with light source. With the easy adhesion and portability of the flashing light source, the application scene and application mode of identifying the target object are expanded, which has great application value in industry and life.


At block 120, a processor obtains stripe sets in the image.


At block 130, a processor takes a center of each stripe set as a reference point, and samples along a first direction to obtain n sampling points (d1, d2, . . . dn).


In some embodiments, a coordinate system can be established, the center of the coordinate system may be the upper left corner of the image, the positive direction of the x-axis may be the rightward direction of the image, and the positive direction of the y-axis may be the downward direction of the image. The center of the coordinate system may be established at other points of the image according to actual needs. The first direction may be a direction perpendicular to an extending direction of stripes in the stripe set. In this embodiment, the first direction is the positive direction of the y-axis. The center (u0, v0) of each stripe set can be calculated after establishing the coordinate system. Taking the center of the stripe set as a reference point, n sampling point (d1, d2, . . . , dn) can be obtained by sampling along the first direction. Wherein, the center of the stripe set may be a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set; u0 is a coordinate value of the center on the x-axis, and v0 is a coordinate value of the center on the y-axis.


In some embodiments, the center of the stripe set is a gray-scale center, the method for calculating the center of the stripe set may be specifically as follows. The processor can obtain the gray-scale value of each pixel in the image, and calculate the gray-scale center of the stripe set according to formula (1).









{





u
0

=


(




i
=
1

k




u
i

×

gray


(


u
i

,

v
i


)




)





i
=
1

k



gray


(


u
i

,

v
i


)











v
0

=


(




i
=
1

k




v
i

×

gray


(


u
i

,

v
i


)




)





i
=
1

k



gray


(


u
i

,

v
i


)












formula






(
1
)








Wherein, i is a serial number of the stripe set, pixels, k is a total number of pixels in the image, and i<k, ui is a coordinate value of the pixel i on the x-axis, vi is a coordinate value of the pixel i on the y-axis, and gray (ui, vi) is the gray-scale value of the pixel i.


In some embodiments, taking the center (u0, v0) of the stripe set as a reference point, sampling along the first direction to obtain n sampling point (d1, d2, . . . , dn) may be as follows. When the first direction is a direction parallel to the width of the image, wherein the width direction of the image is the y-axis direction and the center of the stripe set is taken as the reference point of the first direction, the processor can obtain n sampling points






{



d
1

=

(


u
0

,


v
0

-

n
2



)


,


d
2

=

(


u
0

,


v
0

-


n
-
1

2



)


,





,


d
n

=

(


u
0

,


v
0

+


n
-
1

2



)



}





by sampling along the first direction.


At block 140, a processor extends the n sampling points (d1, d2, . . . , dn) periodically to obtain N calculation points, wherein n is a positive integer greater than 1, and N is greater than n.


In some embodiments, n sampling points (d1, d2, . . . , dn) may be extended periodically, and the period may be k cycles, thus N calculation points






[



(


d
1

,

d
2

,





,

d
n


)

,

(


d
1

,

d
2

,





,

d
n


)

,








(


d
1

,

d
2

,





,

d
n


)






k





cycles



]





may be obtained wherein N is equal to n multiply (k−1) and plus m, m is less than or equal to n,






m
=

N
-


int


(

N
n

)


*

n
.








As shown in FIG. 3, 8 protuberant waveforms are illustrated, each waveform includes 8 peaks, each peak corresponds to one sampling point in points (d1, d2, . . . , ds), 256 calculation points can be obtained when extending sampling points with 8 cycles.


In an actual scene, the number of the sampling points may be the same or different when different stripe sets are sampled, and it is not limited in the present disclosure.


At block 150, a processor transforms the N calculation points to frequency domain to obtain frequency domain data, and identifies the flashing light source according to the frequency domain data.


The frequency domain data can be obtained by transforming the N calculation points to frequency domain. Since the frequency domain data corresponds to the flashing light sources, the frequency domain data obtained from the different flashing light sources is different, the frequency domain data obtained from the same flashing light sources is same, thus, the flashing light source can be identified according to the frequency domain data. Wherein, transforming to the frequency domain can use a Fourier transform, a Laplace transform, a Z transform, and the like. The frequency domain data may be a combination of any one or more of amplitude data, energy data, and phase data. For example, the processor can obtain the waveform of the frequency domain data shown in FIG. 4 by performing Fourier transform on 256 calculation points shown in FIG. 3.



FIG. 5 illustrates a schematic view of a device for identifying flashing light source according to embodiments of the present disclosure. The device 50 may include an obtaining module 510, a sampling module 520, and a processing module 530.


The obtaining module 510 may be configured to obtain an image via a rolling shutter image sensor capturing an image of an environmental background, wherein the environmental background may include flashing light sources, and the flashing light sources may be movable; and configured to obtain stripe sets in the image, wherein the stripe sets can be obtained by capturing the flashing light sources via the rolling shutter image sensor.


The sampling module 520 may be configured to take the center of each stripe set as a reference point, and sample along a first direction to obtain n sampling points d1, d2, . . . , dn).


The processing module 530 may be configured to process the a sampling points (d1, d2, . . . , dn) to identify the flashing light source.


In some embodiments, the first direction may be a direction perpendicular to an extending direction of stripes in the stripe set.


In some embodiments, the processing module 530 may include an extending unit 531. The extending unit 531 may be configured to extend the a sampling points (d1, d2, . . . , dn) periodically to obtain N calculation points, wherein N is greater than n.


In some embodiments, the processing module 530 may further include a transforming unit 533. The transforming unit 533 may be configured to transform the N calculation points to frequency domain to obtain frequency domain data, and identify the flashing light source according to the frequency domain data.


In some embodiments, a coordinate system can be established, the origin of the coordinate system may be the position of the top left pixel of the image, the positive direction of the x-axis may be the rightward direction of the image, and the positive direction of the y-axis may be the downward direction of the image. The center (u0, v0) of each stripe set can be obtained after establishing the coordinate system.


In some embodiments, the extending unit 531 may be configured to extend the a sampling points (d1, d2, . . . , dn) periodically, and the period may be k cycles, to obtain N calculation points







[



(


d
1

,

d
2

,





,

d
n


)

,

(


d
1

,

d
2

,





,

d
n


)

,








(


d
1

,

d
2

,





,

d
m


)






k





cycles



]

,





wherein, N is equal to n multiply (k−1) and plus in, in is less than or equal to n.


In some embodiments, when the first direction is a direction parallel to the width of the image, the sampling module 520 may be configured to take the center of the stripe set as the reference point of the first direction, and sample along the first direction to obtain n sampling points







{



d
1

=

(


u
0

,


v
0

-

n
2



)


,


d
2

=

(


u
0

,


v
0

-


n
-
1

2



)


,





,


d
n

=

(


u
0

,


v
0

+


n
-
1

2



)



}

.





In some embodiments, when the first direction is a direction perpendicular to the width of the image, the sampling module 520 may be configured to take the center of the stripe set as the reference point of the first direction, and sample along the first direction to obtain n sampling points







{



d
1

=

(



u
0

-

n
2


,

v
0


)


,


d
2

=

(



u
0

-


n
-
1

2


,

v
0


)


,





,


d
n

=

(



u
0

+


n
-
1

2


,

v
0


)



}

.




In some embodiments, the center of the stripe set may be a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.


In some embodiments, the frequency domain data may be a combination of any one or more of amplitude data, energy data, and phase data.


It is understandable that the functions of each functional unit of the device 50 in the embodiments can be realized according to the method as illustrated in FIG. 1, which will not be described here.


As illustrated in FIG. 6, the present disclosure further provides a device. Specifically, the device 600 may include an RF (radio frequency) circuit 610, a memory 620 having one or more a computer readable medium, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a Wi-Fi (wireless fidelity) module 670, a processor 680 having one or more processing cores, and a power supply 690 and the like. It will be understood by those skilled in the art that the device structure shown in FIG. 6 does not constitute a limitation on the device and may include more or fewer components than illustrated, or to combine certain components, or different component arrangements.


Wherein. The RF circuit 610 may be used to receive and transmit information, or to receive and transmit signals during a call. The downlink information of the base station is received and processed by one or more processors 680, and the uplink data is transmitted to the base station. Typically, the RF circuit 610 may include, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexes, etc. In addition, the RF circuit 610 may also communicate with the network and other devices by wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access) LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.


The memory 620 may be used to store software programs and modules. The processor 680 executes various functional applications and data processing by running software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area. Wherein the storage program area may store an operating system, at least one application program required for the function (such as voice playback, image playback and so on), and the like; the storage, data area may store data (such as audio data, telephone book, etc.) created according to the use of the device 600, and the like. In addition, the memory 620 may include high-speed random access memory, and also may include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid state memory device. Accordingly, the memory 620 may also include a memory controller to provide access to the memory 620 by the processor 680 and the input unit 630.


The input unit 630 may be used to receive input digital or character information and to generate a signal input of keyboard, mouse, joystick, optical or trackball related to user settings and function control. The input unit 630 may include a touch-sensitive surface 631 and other input devices 632. The touch-sensitive surface 631, also referred to as a touch screen or a touchpad, can collect a touch operation on or near the user (such as a user operation on the touch-sensitive surface 631 or near the touch-sensitive surface 631 using a finger or stylus or any suitable object or attachment) and drives the corresponding connection device according to a preset program. Alternatively, the touch-sensitive surface 631 may include both a touch detection device and a touch controller. Wherein the touch detection device detects a touching position of the user and detects a signal from the touch operation to transmit a signal to the touch controller. The touch controller receives the touch information from the touch detection device and converts it into contact coordinates and sends it to the processor 680 and can receive the command sent by the processor 680 and execute it. In addition, the touch-sensitive surface 631 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 631, the input unit 630 may also include other input devices 632. Other input devices 632 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.


The display unit 640 may be used to display information entered by the user or information provided to the user and various graphical user interfaces of the device 600, which may be constructed from graphics, text, icons, video, and any combination thereof. The display unit 640 may include a display panel 641, and the display panel 641 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 631 may cover the display panel 641. If the touch-sensitive surface 631 detects a touch operation on or near it, the touch-sensitive surface 631 sent the result to the processor 680 to determine the type: of touch event. The processor 680 then provides a corresponding: visual output on the display panel 641 according to the type of touch event Although the touch-sensitive surface 631 and the display panel 641 are as two separate components in FIG. 9 to realize the input and input functions, but in some embodiments the touch-sensitive surface 631 may be integrated with the display panel 641 to achieve input and output function.


The device 600 may also include at least one sensor 660, such as a light sensor, a motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 in accordance with the shading of the ambient light, and the proximity sensor may turn off the display panel 641 and/or make the display panel 641 backlight when the device 600 is moved to the ear. As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of the acceleration in all directions (usually three axes). When the gravity acceleration sensor is stationary, it can detect the size and direction of gravity, can be used to the application to identify the gesture of mobile phone gesture (such as vertical and horizontal screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer, percussion) and so on. As for the device 600 can also be configured gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, will not repeat them here.


An audio circuit 660, a speaker 661, and a microphone 662 may provide an audio interface between the user and the device 600. The audio circuit 660 may transmit the received electrical data converted by the received audio data to the speaker 661, and the speaker 661 converts the electrical signal into an audio signal output. On the other hand, the microphone 662 converts the captured sound signal into an electrical signal, the audio circuit 660 receives the electrical signal and converts it into audio data, outputs the audio data to the processor 680, the processor processes the audio data, the RF circuit 610 sends the processed audio data to, for example, another device, or outputs the audio data to the memory 620 for further processing. The audio circuit 660 may also include an ear plug jack to provide communication between the peripheral headset and the device 600.


WiFi is a short distance wireless transmission technology. Device 600 through the WiFi module 670 can help users send and receive e-mail, browse the web and access streaming media. WiFi provides users with wireless broadband Internet access. Although FIG. 6 shows the WiFi module 670, the WiFi module 670 does not belong to the necessary configuration of the device 600 and can be omitted as needed without departing from the spirit of the present disclosure.


The processor 680 is a control center of the device 600, and various parts of the entire phone are connected by various interfaces and lines. The processor 680 performs various functions and processing data of the device 600 by running or executing software programs and/or modules stored in the memory 620, and invoking the data stored in the memory 620, to monitor, the phone overall. In some embodiments, the processor 680 may include one or more processing cores. Preferably, the processor 680 may integrate an application processor and a modem processor. Among them, the application processor mainly handles the operating system, the user interface and the application program and so on. The modem processor mainly handles wireless communications. It will be appreciated that the above-described modem processor may not be integrated into the processor 680.


The device 600 also includes a power supply 690 (e.g., a battery) that supplies power to the various components. Preferably, the power supply may be logically connected to the processor 680 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system. The power supply 690 may also include any one or more components such as DC or AC power, a recharging system, a power failure detection circuit, a power converter or an inverter, a power status indicator, and the like.


Although not shown, the device 600 may include a camera, a Bluetooth module and so on, and will not be described again. Specifically, in the embodiment, the display unit of the device is a touch screen display. The device also includes a memory, and one or more programs. Wherein one or more of the programs are stored in memory and configured to be executed by one or more processors. The one or more programs contain instructions for performing the following operations.


The processor 680 obtains an image via a rolling shutter image sensor, the rolling shutter image sensor capturing an image of an environmental background, wherein the environmental background may include flashing light sources, and the flashing light sources may be movable. The processor 680 obtains stripe sets in the image, wherein the stripe sets in the image can be obtained by capturing the flashing light sources via the rolling shutter image sensor. The processor 680 takes a center of each stripe set as a reference point, and samples along a first direction to obtain n sampling points (d1, d2, . . . , dn). The processor 680 identifies the flashing light source by processing the n sampling points (d1, d2, . . . , dn).


In some embodiments, the first direction may be a direction perpendicular to an extending direction of stripes in the stripe set.


In some embodiments, the processor 680 extends the n sampling points (d1, d2, . . . , dn) periodically to obtain N calculation points, wherein N is greater than n.


In some embodiments, the processor 680 transforms the N calculation points to frequency domain to obtain frequency domain data, and identifies the flashing light source according to the frequency domain data.


In some embodiments, a coordinate system can be established, the origin of the coordinate system may be the position of the top left pixel of the image, the positive direction of the x-axis may be the rightward direction of the image, and the positive direction of the y-axis may be the downward direction of the image. The center (u0, v0) of each stripe set can be obtained after establishing the coordinate system.


In some embodiments, n sampling points (d1, d2, . . . , dn) may be extended periodically, and the period may be k cycles, thus N calculation points






[



(


d
1

,

d
2

,





,

d
n


)

,

(


d
1

,

d
2

,





,

d
n


)

,








(


d
1

,

d
2

,





,

d
m


)






k





cycles



]





may be obtained, wherein, N is equal to n multiply (k−1) and plus m, m is less than or equal to n.


In some embodiments, when the first direction is a direction parallel to the width of the image and the center of the stripe set is taken as the reference point of the first direction, the processor 680 can obtain n sampling points






{



d
1

=

(


u
0

,


v
0

-

n
2



)


,


d
2

=

(


u
0

,


v
0

-


n
-
1

2



)


,





,


d
n

=

(


u
0

,


v
0

+


n
-
1

2



)



}





by sampling along the first direction. In some embodiments, when the first direction is a direction perpendicular to the width of the image and the center of the stripe set is taken as the reference point of the first direction the processor 680 can obtain n sampling points






{



d
1

=

(



u
0

-

n
2


,

v
0


)


,


d
2

=

(



u
0

-


n
-
1

2


,

v
0


)


,





,


d
n

=

(



u
0

+


n
-
1

2


,

v
0


)



}





by sampling along the first direction.


In some embodiments, the center of the stripe set may be a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.


In some embodiments, the frequency domain data may be a combination of any one or more of amplitude data, energy data, and phase data.


The embodiments of the present disclosure obtain stripe sets in the image, and sample along the first direction to obtain n sampling points (d1, d2, . . . , ds) by taking a center of the stripe set as a reference point. The flashing light source can be identified by processing the n sampling points (d1, d2, . . . , ds). The method in the above embodiments can identify the flashing light source automatically, and solves the problem of identifying automatically of the flashing light source which is hoped to be solved but has not been solved.


The nature of the technical solution of the present application, the part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part steps of the method described in each of the embodiments of the present application. The aforementioned storage medium includes a variety of media such as a USB disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, which can store program code.


The above embodiments are only optional embodiment of the present disclosure, and the scope of the present disclosure is not limited thereto. Equivalent variations in the claims of the present disclosure are still within the scope of the present disclosure.

Claims
  • 1. A method for identifying a flashing light source, comprising: obtaining an image via a rolling shutter image sensor configured to capture an image of environmental background, wherein the environmental background includes movable flashing light sources;obtaining stripe sets in the image, wherein the stripe sets are obtained by capturing the flashing light sources via the rolling shutter image sensor;sampling along a first direction to obtain n sampling points (d1, d2, . . . , dn), wherein the center of each stripe set is taken as a reference point;processing the n sampling points to identify the flashing light source, comprising: extending, the n sampling points periodically in k cycles, to obtain N calculation points
  • 2. The method of claim 1, wherein the first direction is a direction perpendicular to an extending direction of stripes in the stripe set.
  • 3. The method of claim 1, wherein processing the n sampling points, further comprises: transforming the N calculation points to frequency domain to obtain frequency domain data, and identifying the flashing light source according to the frequency domain data.
  • 4. The method of claim 3, the frequency domain data is a combination of any one or more of amplitude data, energy data, and phase data.
  • 5. The method of claim 1, further comprising: establishing a coordinate system to obtain the center (uo, v0) of each stripe set, wherein the origin of the coordinate system is the position of the top left pixel of the image, the positive direction of the x-axis is the rightward direction of the image, and the positive direction of the y-axis is the downward direction of the image.
  • 6. The method of claim 5, further comprising: sampling along the first direction to obtain n sampling points
  • 7. The method of claim 1, the center of the stripe set is a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.
  • 8. An electronic device, comprising: a rolling shutter image sensor configured to capture an image of environmental background; one or more processors; and a memory storing one or more programs configured to be executed by the one or more processors, the one or more programs including instructions for: obtaining an image via the rolling shutter image sensor, wherein the environmental background includes movable flashing light sources;obtaining stripe sets in the image, wherein the stripe sets are obtained by capturing the flashing light sources via the rolling shutter image sensor;sampling along a first direction to obtain n sampling points (d1, d2, . . . , dn), wherein the center of each stripe set is taken as a reference point; andprocessing the n sampling points to identify the flashing light source, comprising: extending the n sampling points periodically in k cycles, to obtain N calculation points
  • 9. The device of claim 8, wherein processing the n sampling points, further comprises: transforming the N calculation points to frequency domain to obtain frequency domain data, and identifying the flashing light source according to the frequency domain data.
  • 10. The device of claim 8, the one or more programs further including instructions for: establishing a coordinate system to obtain the center (uo, v0) of each stripe set, wherein the origin of the coordinate system is the position of the top left pixel of the image, the positive direction of the x-axis is the rightward direction of the image, and the positive direction of the y-axis is the downward direction of the image.
  • 11. The device of claim 8, the one or more programs further including instructions for: sampling along the first direction to obtain n sampling points
  • 12. The device of claim 8, wherein the first direction is a direction perpendicular to an extending direction of stripes in the stripe set.
  • 13. The device of claim 8, wherein the center of the stripe set is a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.
  • 14. The device of claim 8, wherein the frequency domain data is a combination of any one or more of amplitude data, energy data, and phase data.
  • 15. A non-transitory computer readable medium storing on or more programs configured to be executed by one or more processors of an electronic device, the one or more programs comprising instruction for: obtaining an image via a rolling shutter image sensor configured to capture an image of an environmental background, wherein the environmental background includes movable flashing light sources;obtaining stripe sets in the image, wherein the stripe sets are obtained by capturing the flashing light sources through the rolling shutter image sensor;establishing a coordinate system to obtain the center (uo, v0) of each stripe set, wherein the origin of the coordinate system is at the upper left corner of the image, a positive direction of x-axis is the rightward direction of the image, and a positive direction of y-axis is the downward direction of the image;sampling along a first direction to obtain n sampling points (d1, d2, . . . , dn), wherein the center of each stripe set is taken as a reference point, n sampling points (d1, d2, . . . , dn) are determined by
  • 16. The medium of claim 15, wherein processing the n sampling points comprises: extending the n sampling points periodically to obtain N calculation points, wherein N is greater than n.
  • 17. The medium of claim 16, wherein processing the n sampling points, further comprises: transforming the N calculation points to frequency domain to obtain frequency domain data, and identifying the flashing light source according to the frequency domain data.
  • 18. The medium of claim 15, wherein the center of the stripe set is a gray-scale center of the stripe set, a geometric center of the stripe set, or an energy center of the stripe set.
  • 19. The medium of claim 15, wherein the frequency domain data is a combination of any one or more of amplitude data, energy data, and phase data.
  • 20. The medium of claim 15, wherein processing then sampling points to identify the flashing light source, comprises: extending, the n sampling points periodically in k cycles, to obtain N calculation points
CROSS-REFERENCE TO RELATED APPLICATION

The present application is a continuation-application of International (PCT) Patent Application No. PCT/CN2016/090082, titled “METHOD AND DEVICE FOR IDENTIFYING FLASHING LIGHT SOURCE” and filed on Jul. 14, 2016. The entirety of the above-mentioned application is hereby incorporated by reference herein.

US Referenced Citations (8)
Number Name Date Kind
20130236007 Munro Sep 2013 A1
20140126835 Shioya May 2014 A1
20140301737 Guo Oct 2014 A1
20140372072 Guo Dec 2014 A1
20170317663 Zhuang Nov 2017 A1
20180173327 He Jun 2018 A1
20190042813 Jang Feb 2019 A1
20190392590 Hu Dec 2019 A1
Foreign Referenced Citations (3)
Number Date Country
1882041 Dec 2006 CN
103051843 Apr 2013 CN
103383446 Nov 2013 CN
Non-Patent Literature Citations (1)
Entry
International Search Report issued in corresponding International application No. 2016090082, dated Mar. 29, 2017(7 pages).
Related Publications (1)
Number Date Country
20200209712 A1 Jul 2020 US
Continuations (1)
Number Date Country
Parent PCT/CN2016/090082 Jul 2016 US
Child 16231620 US