WO2023005424A1 - Electronic device, information synchronization method, and computer readable storage medium - Google Patents

Electronic device, information synchronization method, and computer readable storage medium Download PDF

Info

Publication number
WO2023005424A1
WO2023005424A1 PCT/CN2022/096942 CN2022096942W WO2023005424A1 WO 2023005424 A1 WO2023005424 A1 WO 2023005424A1 CN 2022096942 W CN2022096942 W CN 2022096942W WO 2023005424 A1 WO2023005424 A1 WO 2023005424A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
attitude
image
signal
electronic device
Prior art date
Application number
PCT/CN2022/096942
Other languages
French (fr)
Chinese (zh)
Inventor
胡攀
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023005424A1 publication Critical patent/WO2023005424A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/54Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/665Control of cameras or camera modules involving internal camera communication with the image sensor, e.g. synchronising or multiplexing SSIS control signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6812Motion detection based on additional sensors, e.g. acceleration sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/685Vibration or motion blur correction performed by mechanical compensation
    • H04N23/687Vibration or motion blur correction performed by mechanical compensation by shifting the lens or sensor position

Definitions

  • the present application relates to the technical field of image processing, and in particular to an electronic device, an information synchronization method, and a computer-readable storage medium.
  • electronic devices such as mobile phones and tablet computers are usually equipped with cameras, so as to provide users with a camera function, so that users can record what is happening around them, the scenery they see, etc. anytime and anywhere through these electronic devices.
  • the user usually holds the electronic device for shooting, and the electronic device held by the user will introduce different degrees of shaking and affect the stability of the shooting of the electronic device, resulting in poor quality of the captured image.
  • the image needs to be compensated by means of electronic image stabilization and/or optical image stabilization.
  • Embodiments of the present application provide an electronic device, an information synchronization method, and a computer-readable storage medium, which can improve the accuracy of synchronization between image information and posture information.
  • An embodiment of the present application provides an electronic device, and the electronic device includes:
  • Attitude sensor for collecting attitude information
  • a driver chip connected to the attitude sensor and the image sensor respectively, the driver chip is used to obtain the attitude information and the synchronization signal of the image information, and perform the synchronization signal of the attitude information and the image information Synchronize to obtain the synchronized attitude information.
  • An embodiment of the present application provides an information synchronization method, which is applied to an electronic device.
  • the electronic device includes a driver chip, an image sensor, and an attitude sensor.
  • the information synchronization method includes:
  • An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the information synchronization method described above are implemented.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 2 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 3 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 4 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of progressive exposure of an image sensor provided by an embodiment of the present application.
  • FIG. 6 is a timing diagram between frames of an image sensor provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the internal design and external wiring of the driver chip provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of an information synchronization method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of an information synchronization method provided by an embodiment of the present application.
  • Fig. 10 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • An embodiment of the present application provides an electronic device, and the electronic device includes:
  • Attitude sensor for collecting attitude information
  • a driver chip connected to the attitude sensor and the image sensor respectively, the driver chip is used to obtain the attitude information and the synchronization signal of the image information, and transfer the attitude information and the synchronization signal of the image information Synchronize to obtain the synchronized attitude information.
  • the driver chip includes a buffer memory and a register, the register is connected to the attitude sensor, the register is used to register the attitude information obtained from the attitude sensor, and the buffer
  • the memory is respectively connected to the register and the image sensor, and the buffer memory is used to acquire the attitude information from the register and the synchronization signal of the image information from the image sensor, so as to transfer the acquired
  • the gesture information is synchronized with the synchronization signal of the image information.
  • the buffer memory is connected to the image sensor through a GPIO interface, and is used to obtain a synchronization signal of the image information.
  • the buffer memory is further connected to the image sensor through a first SPI interface, and is configured to send the synchronized posture information to the image sensor.
  • the register is connected to the attitude sensor through a second SPI interface, and is used to acquire the attitude information.
  • the synchronous signal of the image information includes a frame synchronous signal and an exposure line synchronous signal
  • the image sensor is used to send the frame synchronous signal and the exposure line synchronous signal to the driver chip
  • the drive chip is used to assign a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal when the attitude information is acquired.
  • the driver chip is used to obtain a frame interruption signal according to the frame synchronization signal, obtain a row interruption signal according to the exposure row synchronization signal, and obtain a row interruption signal according to the frame interruption signal and the row
  • the interrupt signal assigns a value to the acquired attitude information.
  • the electronic device further includes a driving motor and a lens, and the driving chip is connected to the driving motor;
  • the drive chip is also used to calculate first compensation data according to the acquired posture information, and the drive motor is used to drive the lens and/or the image sensor to move according to the first compensation data to achieve optical anti-shake.
  • the electronic device further includes a driving motor and a lens, and the driving chip is connected to the driving motor;
  • the driving chip is further used to receive second compensation data, and the driving motor is used to drive the lens and/or the image sensor to move according to the second compensation data to achieve optical anti-shake.
  • the electronic device further includes a drive motor, the drive chip is connected to the drive motor, and the drive chip is also used to determine the target from the synchronization signal of the image information signal, the drive chip turns off the control function of the drive motor according to the target signal.
  • the electronic device further includes an application processor, and the application processor is configured to obtain the synchronized posture information, so as to implement electronic anti-shake and / or optical image stabilization.
  • the attitude sensor includes one or more of an accelerometer, a Hall sensor, a gyroscope, a magnetometer, and a gravimeter.
  • the present application also provides an information synchronization method, which is applied to an electronic device, and the electronic device includes a driver chip, an image sensor, and an attitude sensor, and the information synchronization method includes:
  • the driver chip includes a buffer memory and a register, and the acquisition of the synchronization signal of the posture information and the image information through the driver chip includes:
  • the register buffers the attitude information to the buffer memory when the attitude information is acquired
  • the buffer memory buffers the posture information
  • the received synchronization signal of the image information is synchronized with the buffered posture information.
  • the synchronization signal of the image information includes a frame synchronization signal and an exposure line synchronization signal
  • the synchronizing the posture information and the synchronization signal of the image information includes:
  • the drive chip When the drive chip acquires the attitude information, it assigns a value to the acquired attitude information according to the frame synchronization signal and the exposure row synchronization signal.
  • the assigning the acquired posture information according to the frame synchronization signal and the exposure line synchronization signal includes:
  • the electronic device further includes a drive motor and a lens
  • the information synchronization method further includes:
  • the second compensation data is received by the drive chip, and the lens and/or the image sensor are driven to move by the drive motor according to the second compensation data to achieve optical anti-shake.
  • the method further includes:
  • the drive chip determines the target signal from the synchronization signal of the image information
  • the driving motor is controlled to stop driving the lens and/or the image sensor according to the target signal.
  • the electronic device further includes an application processor, and after the synchronized posture information is obtained, the information synchronization method further includes:
  • the image sensor sends the synchronized attitude information to the application processor
  • the application processor implements electronic anti-shake and/or optical anti-shake according to the synchronized attitude information.
  • An embodiment of the present application provides an electronic device, an information synchronization method, and a computer-readable storage medium, wherein the execution body of the information synchronization method may be the electronic device provided in the embodiment of the present application, wherein the electronic device may be a smart phone, a tablet computer, Handheld computers, notebook computers and other devices equipped with processors and capable of data processing.
  • Figure 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application
  • Figure 2 is a structural block diagram of an electronic device provided by an embodiment of the present application
  • the electronic device 10 includes: an image sensor 110, a gesture The sensor 120 and the driver chip 130
  • the electronic device 10 can be a smart phone with a camera function, wherein the image sensor 110 is used to collect image information when the electronic device 10 is shooting, and the attitude sensor is used to collect the attitude information of the electronic device 10 .
  • the driver chip 130 is connected with the image sensor 110 and the attitude sensor 120 respectively, and the driver chip 130 is used to obtain the synchronization signal of the attitude information and the image information, and synchronize the attitude information and the synchronization signal of the image information to obtain the synchronized attitude information .
  • the image sensor 110 can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image.
  • the image sensor can collect image information, and can generate a synchronous signal while collecting the image information, wherein the synchronous signal can be a synchronous signal that provides a time reference and is generated when the image information is collected.
  • the posture sensor 120 can collect posture information of the electronic device, and the posture information can reflect the movement change and position change of the electronic device, and the posture sensor can collect posture information after receiving the collection signal, for example, when the electronic device is in the shooting state,
  • the attitude sensor sends a collection signal, and the attitude sensor collects attitude information of the electronic device.
  • the attitude sensor can also collect attitude information in real time after the electronic equipment is powered on, for example, after the electronic equipment is turned on, the attitude sensor collects the attitude information of the electronic equipment.
  • the driver chip 130 is often used to achieve optical image stabilization.
  • the optical components are driven according to the acquired attitude information of the attitude sensor, so as to avoid or reduce the occurrence of the image sensor in the process of capturing optical signals. Jitter phenomenon, thereby improving image quality.
  • the driver chip provided in the embodiment of the present application is also used to realize the synchronization of posture information, and obtain the synchronized posture information, which is used to realize electronic anti-shake.
  • the electronic device Compared with the software synchronization method that synchronizes image information and attitude information through time stamps, which may cause errors, the electronic device provided in the embodiment of the present application uses a driver chip to synchronize the synchronization signal of image information with attitude information, and through hardware synchronization. , which can improve the accuracy of synchronization between pose information and image information.
  • the electronic device further includes a lens, a driving motor, and an application processor.
  • FIG. 3 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • the attitude sensor can collect attitude information of the electronic device, and the attitude sensor can include one or more of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravity meter (Gravity). Of course, it can also include other types of attitude sensors.
  • the attitude information can reflect the movement and position changes of the electronic device.
  • the attitude sensor can collect the attitude information after receiving the acquisition signal.
  • the sensor sends a collection signal, and the attitude sensor collects attitude information of the electronic device.
  • the attitude sensor can also collect attitude information in real time after the electronic device is powered on, for example, after the electronic device is turned on, the attitude sensor collects the attitude information of the electronic device.
  • the drive chip is connected to the attitude sensor and the drive motor respectively, and the drive motor can drive the lens and/or the image sensor to move to achieve optical image stabilization.
  • the drive chip can be used as a control module for the drive motor, and the drive motor can include controlling the focus of the lens motors, motors that control lens motion for optical compensation, and/or motors that control image sensor motion.
  • the drive chip can include a control algorithm based on optical compensation.
  • the drive chip can calculate the drive amount of the drive motor according to the read attitude information, so that the drive motor can drive the lens and/or the image sensor to move, so as to realize optical compensation. anti-shake.
  • the control logic for the driver chip to implement optical image stabilization may be as follows:
  • the driver chip After the driver chip reads the attitude information of the attitude sensor (Gyro, Acc, Mag and/or Gravity), it performs a filtering operation on the read attitude information to obtain the filtered attitude information, and integrates and gains the filtered attitude information Operation, used to calculate the amount of shaking of the electronic device, the driver chip obtains the position information of the current lens and/or image sensor through the Hall sensor (Hall), whether it is the position information of the lens or the position information of the image sensor, or the position information of the lens And the position of the image sensor is related to the number and position of the Hall sensor.
  • the attitude information of the attitude sensor Gyro, Acc, Mag and/or Gravity
  • the drive chip calculates the optical compensation data (such as first compensation data) of the lens and/or image sensor according to the shake amount of the electronic device and the current position information of the lens and/or image sensor, and sends a drive signal to the drive motor according to the first compensation data , to enable the drive motor to drive the lens and/or the image sensor to move to a target position, so as to achieve optical image stabilization.
  • the realization of optical image stabilization through the drive chip is a real-time high-frequency feedback control process, and the drive motor can stably drive the lens and/or image sensor to the target position through PID (Proportion Integral Differential) control.
  • the driver chip only needs to continuously adjust the position of the lens and/or image sensor in real time according to the current shaking situation of the electronic device.
  • the factors that affect the imaging effect of the image are only the time when the image sensor is exposed. Jitter, for the jitter in other non-exposure time, since the image sensor has no imaging, it has no effect.
  • the relevant optical image stabilization technology needs to continuously adjust the lens and/or the image sensor, resulting in unnecessary overhead for electronic equipment.
  • the driver chip can synchronize the attitude information with the synchronization signal of the collected image information, and dynamically control the drive motor according to the synchronized attitude information, thereby avoiding Overhead of image sensor non-exposure time, reducing power consumption of electronic devices.
  • the driver chip is also connected to the image sensor for obtaining the synchronization signal of the image information collected by the image sensor, generating the synchronization signal of the image information when the image sensor collects the image signal, and sending the synchronization signal of the image information to the driver chip, and the driver chip receives After the synchronization signal of the image information, the current attitude information obtained from the attitude sensor is synchronized with the synchronization signal of the image information to obtain the synchronized attitude information, and the drive chip dynamically controls the drive motor through the above method according to the synchronized attitude information, so that the drive The chip and drive motor achieve optical image stabilization during the exposure time of the image sensor.
  • the driver chip after the driver chip obtains the synchronized posture information, it sends the synchronized posture information to the image sensor, and the image sensor sends the synchronized posture information to the application processor, and the application processor sends the synchronized posture information to the application processor according to the synchronized posture information.
  • Information realizes electronic anti-shake, and electronic anti-shake processing refers to anti-shake processing that uses edge images for compensation.
  • EIS Electronic Image Stabilization, Electronic Image Stabilization
  • the application processor After acquiring the synchronized attitude information, the application processor processes the collected image information through an algorithm according to the synchronized attitude information.
  • the driver chip can be connected to the attitude sensor through a serial peripheral interface (SPI interface) to obtain the attitude information collected by the attitude sensor.
  • the driver chip can be connected to the image sensor through a general-purpose input and output interface (GPIO interface).
  • a synchronous signal generated when the image sensor collects image information is acquired, wherein the synchronous signal may be a synchronous signal generated when the image sensor collects image information, and the synchronous signal may include a frame synchronous signal and an exposure line synchronous signal.
  • the image sensor can collect image information by row-by-row exposure, and the image sensor can collect image information by row-by-row exposure through the rolling shutter.
  • One line is exposed sequentially, so when collecting each line of image information, the attitude information of the electronic device can be the same or different.
  • the corresponding attitude information is the attitude sensor within the exposure time period of the line.
  • the frame synchronization signal can refer to a vertical synchronization pulse signal (Vertical synchronization, Vsync), and the image sensor generates once every time the image sensor acquires image frame data Frame synchronization signal, the frame synchronization signal reflects the frame number of the current exposure image frame of the image sensor.
  • Vsync vertical synchronization pulse signal
  • the frame synchronization signal reflects the frame number of the current exposure image frame of the image sensor.
  • an exposure line synchronous signal is generated once, and the exposure line synchronous signal reflects the line number of the image sensor currently exposing the image frame.
  • FIG. 5 is a schematic diagram of progressive exposure of an image sensor provided by an embodiment of the present application.
  • Exposure Time is the exposure time period
  • SOF is the time point for data readout
  • Read out Time is the time period required for data readout
  • Hsync represents the line synchronization signal generated at the time point when each row is half exposed
  • Vsync represents It is the frame synchronization signal generated at the time point when the whole frame image is exposed to the middle line when the exposure is halfway through.
  • the frame sync signal and exposure row sync signal are sent to the driver chip every time the frame sync signal (Vsync) and exposure row sync signal (Hsync) are generated, and the GPIO interface of the driver chip receives When the image sensor sends a frame synchronization signal, a corresponding frame interruption signal is generated. When the GPIO interface receives the line synchronization signal sent by the image sensor, a corresponding line interruption signal is generated.
  • the image sensor when it exposes the first line of the first frame image, it sends a frame synchronization signal and an exposure line synchronization signal to the driver chip, and the GPIO interface of the driver chip generates the first frame image after receiving the frame synchronization signal Corresponding to the frame interruption signal, the GPIO of the driver chip generates the line interruption signal corresponding to the first row of the first frame image after receiving the exposure line synchronization signal, and the first attitude information obtained from the attitude sensor is compared according to the frame interruption signal and the line interruption signal.
  • the frame interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the first attitude information, and obtain the synchronized attitude information, which can be followed by the first
  • the frame number of the frame image information and the line number of the first line are aligned to the first pose information.
  • the image sensor when it exposes the second row of the first frame image, it sends a frame synchronization signal and an exposure line synchronization signal to the driver chip, and the GPIO interface of the driver chip generates a frame interrupt signal corresponding to the first frame image after receiving the frame synchronization signal , the GPIO interface of the driver chip receives the exposure line synchronization signal and generates the line interruption signal corresponding to the second line of the first frame image, and assigns the second attitude information obtained from the attitude sensor according to the frame interruption signal and the line interruption signal.
  • the interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the second attitude information, and obtain the synchronized attitude information, which can be followed by the first frame of image information.
  • the frame number and the row number of the second row are aligned to the second pose information.
  • the row-by-row exposure speed is faster, and one attitude information can correspond to multiple rows of exposure image information.
  • the driver chip receives the third attitude information sent from the attitude sensor
  • the driver chip from The image sensor acquires the frame interruption signal representing the exposure of the first frame of image and the line interruption signal of exposing the 20th to 30th lines, and establishes the mapping relationship between the third posture data, the frame number and the exposure line number.
  • the driver chip When receiving the fourth attitude information sent from the attitude sensor, the driver chip received the line interrupt signal indicating the exposure of the first frame image from the 31st line to the forty line, but did not receive the frame interruption signal indicating the exposure of the second frame image signal to establish a mapping relationship between the fourth pose data, frame number and exposure line number.
  • the frame number and the row number may be data identifiers generated by the internal counter of the driver chip after receiving the frame interrupt signal and the row interrupt signal.
  • the data identifier can be a specific regular value or other irregular value. It should be noted that the above synchronization method is only exemplary, and the driver chip can also realize the synchronization of attitude information through other hardware synchronization methods.
  • the posture information when the driver chip acquires the posture information, the posture information is synchronized according to the line interruption signal and the frame interruption signal, and the posture information corresponding to each exposure line image information can be SOF+Readout_per_line*Line_number–Exposure_time/2
  • the image information between the time point and the time point of Readout_per_line*(Line_number+1)–Exposure_time/2 is synchronized, wherein, Readout_per_line is the time period required for reading each line of data, Line_number is the number of lines, and Line_number is a natural number.
  • the attitude information obtained between the above two time points can be assigned to the corresponding line number, and the image sensor can control the exposure time and timing, and also control the readout timing of each line of exposure, so it can be accurate at the time when a line is half exposed Send the frame synchronization signal to the driver chip when the exposure line synchronization signal and the entire frame image are exposed to the middle row.
  • the driver chip realizes the synchronization of attitude information according to the exposure line synchronization signal and the frame synchronization signal.
  • FIG. 5 and FIG. 6 is an inter-frame timing diagram of an image sensor provided by an embodiment of the present application.
  • the shutter Shutr
  • Hsync is generated and read out and sent to the driver chip
  • half of the exposure is performed when the exposure reaches the middle row.
  • the time point is read out (Reaout) and sent to the driver chip.
  • the Vsync driver chip of each frame of the image sensor can receive it, the attitude information obtained between two adjacent Vsyncs can be used as the attitude information of this frame, and the received Hsync represents the position of each line in each frame. attitude information.
  • Vsync can identify the first attitude information of this frame until the target signal (Hsync) that is exposed to the last line of this frame is identified to identify the last attitude information of this frame.
  • the control function of the drive chip for the drive motor can be turned off when the target signal of the last line of each frame is received and the exposure is stopped, and the control function of the drive chip for the drive motor can be turned on when the exposure of the first line of each frame starts, so that the drive chip can only be in the It only works when the frame image is exposed, so that the power consumption of the overall system can be reduced.
  • the driver chip can be connected to the image sensor through the SPI interface, and the synchronized attitude information can be sent to the image sensor through the SPI interface, so that the image sensor can compare the image frame data with the synchronized
  • the attitude information is packaged to form synchronized information, and the image sensor sends the synchronized information to the application processor, wherein the image sensor can be connected to the application processor through a mobile industry processor interface (MIPI interface).
  • MIPI interface mobile industry processor interface
  • the application processor splits the packaged data after receiving it, and sends the image frame data to the image processor.
  • the image processor can implement electronic anti-shake for the collected image information according to the algorithm and the synchronized attitude information, for example, according to the synchronization
  • the post-posture information performs pose estimation, pose filtering, and image torsion processing on the image frame data to achieve electronic anti-shake.
  • the application processor can also perform feedback adjustment to the driver chip according to the synchronized pose information.
  • the synchronized attitude information obtains the reset information of the lens and/or image sensor, and sends the reset information to the driver chip, and the driver chip resets the optically stabilized lens and/or image sensor according to the reset information to complete the optical image stabilizer.
  • the application processor may include an optical anti-shake algorithm
  • the application processor may obtain the attitude information of the attitude sensor, and calculate the optical compensation data according to the attitude information and the optical anti-shake algorithm (such as the second compensation data)
  • the second compensation data is sent to the driver chip
  • the driver chip enables the drive motor to drive the lens and/or the image sensor to move to the target position according to the second compensation data, so as to achieve optical anti-shake
  • the driver chip Only the synchronization of attitude information, the driving of the lens and the driving of the image sensor need to be performed, and the algorithm related to optical image stabilization can be executed in the application processor, which can reduce the data processing amount of the driver chip.
  • the driver chip can include a buffer memory and a register, the register is connected to the attitude sensor, the register is used to store the attitude information obtained from the attitude sensor, the buffer memory is connected to the register and the image sensor respectively, and the buffer memory is used to obtain the attitude information from the register and from the image sensor A synchronization signal of the image information is acquired to synchronize the acquired attitude information with the synchronization signal of the image information.
  • the buffer memory can be a first-in-first-out (First Input First Output, FIFO) register, and the buffer memory can be provided with two GPIO interfaces, one GPIO interface is used to receive the interrupt signal of the frame synchronization signal (Vsync) sent by the image sensor, one The GPIO interface is used to receive the interrupt signal of the exposure line synchronization signal (Hsync) sent by the image sensor.
  • the buffer memory is also provided with a first SPI interface, the first SPI interface can include nSC, SDO, SPC and SOI pins, and correspondingly, the image sensor can include an nSC pin connected to the driver chip nSC pin, and an SDO pin connected to the driver chip.
  • the SDI pin connected to the pin, the SPC pin connected to the SPC pin of the driver chip, and the SDO pin connected to the SOI pin of the driver chip send the synchronized attitude information to the image sensor through the first SPI interface.
  • the register is provided with a second SPI interface
  • the second SPI interface can include a plurality of pins, such as CS1, CS2 ... CSn pins, SDO pins, SPC pins and SOI pins
  • the attitude sensor can include accelerometers, For gyroscopes, magnetometers, etc.
  • the attitude sensor is provided with pins corresponding to the register pins.
  • the register continuously acquires the attitude information collected by the attitude sensor through the second SPI interface, stores the acquired attitude information into the register, the FIFO memory reads the attitude information in the register, and the FIFO memory receives the Vsync interrupt signal and The interrupt signal of Hsync assigns the attitude information read according to the interrupt signal of Vsync and Hsync.
  • the assignment method can adopt the above-mentioned assignment method to obtain the synchronized attitude information.
  • the SPI interface is sent to the image sensor, so that the image sensor packages the attitude information and image frame data, and sends it to the application processor, so that the application processor can realize electronic anti-shake and/or optical anti-shake according to the synchronized attitude information.
  • the first SPI interface of the drive chip was in slave mode (slave mode)
  • the SPI interface of the image sensor was in master mode (master mode)
  • the SPI interface of the image sensor was in master mode.
  • the second SPI interface of the register of the driver chip was in the master mode (master mode) and the SPI interface of the attitude sensor was in the slave mode (slave mode), and the second SPI interface of the register was in the master mode.
  • the SPI interface is used to receive the attitude information transmitted by the SPI interface of the attitude sensor in the slave mode, and the second SPI interface in the master mode can also pass the chip selection signal (CS1, CS2... CSn pin obtained signal) from the multi-channel attitude sensor By reading the data, the attitude information of the attitude sensor can be obtained according to the actual needs.
  • the master-slave mode of the driver chip the data transmission between the driver chip and the peripheral can be made selective and reliable.
  • the embodiment of the present application provides an electronic device, which realizes the synchronization of posture information through a driver chip, and greatly improves the synchronization accuracy of image frame data and posture information and the consistency of information processing through hardware synchronization, and reduces the gap between different devices. The difference between them can also reduce the overall system power consumption.
  • the driver chip provided by this application can control the drive motor to drive the lens and/or the image sensor to move according to the synchronization signal of the image information when the image sensor is exposed, so as to realize the optical anti-shake. During the exposure period, stopping the movement of the lens and/or the image sensor can reduce the power consumption of the system when optical image stabilization is implemented.
  • the synchronization of the attitude information is realized through the driver chip according to the synchronization signal of the image information and the acquired attitude information.
  • the synchronization method of the hardware will The way of software synchronization that causes errors can improve the accuracy of synchronization between attitude information and image information. Further, the accuracy of electronic anti-shake processing image frame data according to the synchronized posture information is improved.
  • optical anti-shake + electronic anti-shake that is, further anti-shake processing of electronic anti-shake on the module with optical anti-shake function
  • it can not only reduce the power consumption of the optical anti-shake module, but also improve Accuracy of electronic image stabilization data processing.
  • FIG. 8 is a schematic flow chart of the information synchronization method provided by an embodiment of the present application.
  • the information synchronization method is applied to electronic equipment, and the electronic equipment includes a driver chip and an image sensor.
  • information synchronization methods include:
  • the attitude sensor can collect the attitude information of the electronic device, and the attitude sensor can include one of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravimeter (Gravity). Or more, of course, can also include other types of attitude sensors.
  • the attitude information can reflect the movement changes and position changes of the electronic equipment.
  • the attitude sensor can collect the attitude information after receiving the collection signal. For example, when the electronic equipment is in the shooting state, The acquisition signal is sent to the attitude sensor, and the attitude sensor collects attitude information. Another example is that the attitude sensor collects attitude information in real time when the electronic device is in a power-on state.
  • the image sensor can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image.
  • the image sensor can collect image information.
  • the image sensor can collect image information through progressive exposure, and collect image information through progressive exposure through the rolling shutter.
  • Each line of the frame image is sequentially exposed, so when collecting each line of image information, the attitude information of the electronic device can be the same or different.
  • the corresponding attitude information is the exposure time of the line The attitude information collected by the attitude sensor in the segment.
  • the driver chip is connected to the attitude sensor and the image sensor respectively, and the image sensor can generate a synchronization signal while collecting image information, wherein the synchronization signal can be a synchronization signal that provides a time reference generated when collecting the image information, for example, the image sensor passes line by line
  • the frame synchronization signal and the exposure line synchronization signal can be generated when the exposure method collects image information.
  • the synchronization signal is sent to the driver chip.
  • the attitude sensor collects the attitude information, it sends the attitude information to the driver chip.
  • the driver chip The synchronization signal of attitude information sent by the attitude sensor and image information sent by the image sensor is received.
  • the information synchronization method provided by the embodiment of the present application can realize the synchronization of attitude information through the driver chip, and the accuracy of the synchronization of attitude information and image information can be improved through hardware synchronization, compared with software synchronization through time stamps.
  • FIG. 9 is a schematic flow diagram of the information synchronization method provided in an embodiment of the present application.
  • Sensors and attitude sensors, information synchronization methods include:
  • the attitude sensor can collect the attitude information of the electronic device, and the attitude sensor can include one of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravimeter (Gravity).
  • attitude information can include the Hall value obtained by the Hall sensor (Hall), the angular velocity value obtained by the gyroscope (Gyro), the acceleration value obtained by the accelerometer (Acc), the magnetic force value obtained by the magnetometer (Magentic) and
  • the gravity value obtained by the gravimeter (Gravity) can also include other types of attitude sensors, of course.
  • the attitude information can reflect the movement and position changes of the electronic device.
  • the attitude sensor can collect the attitude information after receiving the acquisition signal, for example, in When the electronic device is in the shooting state, it sends a collection signal to the attitude sensor, and the attitude sensor collects attitude information.
  • the attitude sensor collects attitude information in real time when the electronic device is in a power-on state.
  • the image sensor can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image.
  • the image sensor can collect image information.
  • the image sensor can collect image information through progressive exposure, and collect image information through progressive exposure through the rolling shutter.
  • Each line of the frame image is sequentially exposed, so when collecting each line of image information, the attitude information of the electronic device can be the same or different.
  • the corresponding attitude information is the exposure time of the line The attitude information collected by the attitude sensor in the segment.
  • the frame synchronization signal may refer to a vertical synchronization pulse signal (Vertical synchronization, Vsync). Every time the image sensor acquires image frame data, a frame synchronization signal is generated. The signal reflects the frame number of the currently exposed image frame of the image sensor.
  • the exposure line synchronization signal may refer to a horizontal synchronization pulse signal (Horizontal synchronization, Hsync).
  • Hsync horizontal synchronization pulse signal
  • the image sensor collects image information by means of line-by-line exposure. An exposure line synchronization signal is generated once, and the exposure line synchronization signal reflects the line number of the image sensor currently exposing the image frame.
  • the frame sync signal (Vsync) and the exposure row sync signal (Hsync) are generated and sent to the driver chip each time.
  • the driving chip receives the frame synchronous signal and the exposure line synchronous signal.
  • the driver chip acquires the attitude information, assign a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal.
  • the image sensor when the image sensor is currently exposing the first frame image, it generates a frame synchronization signal reflecting the frame number. When it is exposed to the first line of the first frame image, it will generate an exposure line synchronization signal reflecting the exposure line number.
  • the exposure row synchronization signal is sent to the driver chip, and at the same time, the driver chip receives the first posture information sent by the posture sensor.
  • the driver chip After the driver chip receives the frame synchronization signal of the first frame image and the exposure row synchronization signal generated by exposing the first row of image data , assign the frame number of the first frame image and the line number of the first line to the first attitude information according to the frame synchronization signal and the exposure line synchronization signal, establish the mapping relationship between the frame number, line number and the first attitude information, and obtain The synchronized first pose information can be subsequently aligned to the first pose information through the frame number of the first frame and the line number of the first line.
  • the attitude information obtained when exposing to the second line in the same way is the second attitude information, assign the frame number of the first frame image and the line number of the second line to the second attitude information, and establish the frame number, line number and The mapping relationship between the second attitude information is to obtain the synchronized second attitude information, which can be subsequently aligned to the second attitude information through the frame number of the first frame and the line number of the second line.
  • the row-by-row exposure speed is faster, and one pose information may correspond to multiple rows of exposure image information.
  • the frame number and row number may be data identifiers generated by an internal evaluator or counter of the image sensor upon receiving a corresponding frame synchronization signal and row synchronization signal.
  • the data identifier can be a specific regular value or other irregular value.
  • assigning the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal may include:
  • the GPIO interface of the driver chip when the GPIO interface of the driver chip receives the frame synchronization signal sent by the image sensor, it generates a corresponding frame interruption signal.
  • the GPIO interface receives the line synchronization signal sent by the image sensor, it generates a corresponding line interruption signal.
  • the interrupt signal assigns a value to the attitude information obtained from the attitude sensor.
  • the driver chip when it exposes the first line of the first frame image, it sends a frame synchronization signal and an exposure row synchronization signal to the driver chip, and the GPIO interface of the driver chip receives the frame After the synchronization signal, the frame interrupt signal corresponding to the first frame image is generated, and the GPIO of the driver chip generates the row interrupt signal corresponding to the first line of the first frame image after receiving the exposure line sync signal, and the slave attitude is determined according to the frame interrupt signal and the row interrupt signal.
  • the first attitude information acquired by the sensor is assigned, and the frame interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the first attitude information, and obtain the synchronized
  • the attitude information can be subsequently aligned to the first attitude information through the frame number of the first frame of image information and the line number of the first line.
  • the driver chip when it exposes the second line of the first frame image, it sends a frame synchronization signal and an exposure row synchronization signal to the driver chip, and the GPIO interface of the driver chip generates a frame interrupt signal corresponding to the first frame image after receiving the frame synchronization signal , the GPIO interface of the driver chip receives the exposure line synchronization signal and generates the line interruption signal corresponding to the second line of the first frame image, and assigns the second attitude information obtained from the attitude sensor according to the frame interruption signal and the line interruption signal.
  • the interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the second attitude information, and obtain the synchronized attitude information, which can be followed by the first frame of image information.
  • the frame number and the row number of the second row are aligned to the second pose information.
  • the row-by-row exposure speed is faster, and one attitude information can correspond to multiple rows of exposure image information.
  • the driver chip receives the third attitude information sent from the attitude sensor
  • the driver chip from The image sensor acquires the frame interruption signal representing the exposure of the first frame of image and the line interruption signal of exposing the 20th to 30th lines, and establishes the mapping relationship between the third posture data, the frame number and the exposure line number.
  • the driver chip When receiving the fourth attitude information sent from the attitude sensor, the driver chip received the line interrupt signal indicating the exposure of the first frame image from the 31st line to the forty line, but did not receive the frame interruption signal indicating the exposure of the second frame image signal to establish a mapping relationship between the fourth pose data, frame number and exposure line number.
  • the frame number and the row number may be data identifiers generated by the internal counter of the driver chip after receiving the frame interrupt signal and the row interrupt signal.
  • the data identifier can be a specific regular value or other irregular value. It should be noted that the above synchronization method is only exemplary, and the driver chip can also realize the synchronization of attitude information through other hardware synchronization methods.
  • the driver chip includes a buffer memory and a register, and obtaining the synchronization signal of the posture information and the image information through the driver chip includes:
  • the register buffers the attitude information to the buffer memory when the attitude information is acquired
  • the synchronization signal of the received image information is synchronized with the buffered attitude information.
  • synchronizing the synchronization signal of the received image information with the buffered posture information can be realized through the above synchronization method.
  • the image sensor sends the synchronized attitude information to the application processor.
  • the application processor implements electronic image stabilization and/or optical image stabilization according to the synchronized attitude information.
  • the image sensor and the driver chip can be connected through the SPI interface, and the driver chip is used to send the synchronized attitude information to the image sensor through the SPI interface, so that the image sensor packages the image frame data and the synchronized attitude information to form synchronized information,
  • the image sensor sends the synchronized information to the application processor, where the image sensor can be connected to the application processor through a mobile industry processor interface (MIPI interface).
  • MIPI interface mobile industry processor interface
  • the application processor splits the packaged data after receiving it, and sends the image frame data to the image processor.
  • the image processor can implement electronic anti-shake for the collected image information according to the algorithm and the synchronized attitude information, for example, according to the synchronization
  • the post-posture information performs pose estimation, pose filtering, and image torsion processing on the image frame data to achieve electronic anti-shake.
  • the application processor can also perform feedback adjustment to the driver chip according to the synchronized pose information.
  • the synchronized attitude information obtains the reset information of the lens and/or image sensor, and sends the reset information to the driver chip, and the driver chip resets the optically stabilized lens and/or image sensor according to the reset information to complete the optical image stabilizer.
  • the electronic device also includes a drive motor and a lens
  • the information synchronization method also includes:
  • the second compensation data is received by the driving chip, and the lens and/or the image sensor are driven to move by the driving motor according to the second compensation data to realize optical anti-shake.
  • the driver chip can be integrated with an optical anti-shake algorithm. After receiving the attitude information, the first compensation data is calculated according to the optical anti-shake algorithm.
  • the driver chip sends the first compensation data to the drive motor, enabling the drive motor to drive the lens and/or Or image sensor movement, the logic of driving the chip to achieve optical image stabilization can be as follows:
  • the driver chip After the driver chip reads the attitude information of the attitude sensor (Gyro, Acc, Mag and/or Gravity), it performs a filtering operation on the read attitude information to obtain the filtered attitude information, and integrates and gains the filtered attitude information Operation, used to calculate the amount of shaking of the electronic device, the driver chip obtains the position information of the current lens and/or image sensor through the Hall sensor (Hall), whether it is the position information of the lens or the position information of the image sensor, or the position information of the lens And the position of the image sensor is related to the number and position of the Hall sensor.
  • the attitude information of the attitude sensor Gyro, Acc, Mag and/or Gravity
  • the drive chip calculates the optical compensation data (such as the first compensation data) of the lens and/or image sensor according to the shaking amount of the electronic device and the current position information of the lens and/or image sensor, and sends a drive signal to the drive motor according to the optical compensation data, To enable the drive motor to drive the lens and/or the image sensor to move to a target position to achieve optical image stabilization.
  • the realization of optical image stabilization through the drive chip is a real-time high-frequency feedback control process, and the drive motor can stably drive the lens and/or image sensor to the target position through PID (Proportion Integral Differential) control.
  • the application processor can obtain the attitude information of the attitude sensor, and calculate the optical compensation data (such as the second compensation data) according to the attitude information and the optical anti-shake algorithm,
  • the application processor sends the second compensation data to the driver chip, and the driver chip sends a drive signal to the drive motor according to the optical compensation data, so as to enable the drive motor to drive the lens and/or the image sensor to move to the target position, so as to achieve optical anti-shake
  • the algorithms related to optical image stabilization can be executed in the application processor, which can reduce the data processing amount of the driver chip.
  • the driver chip only needs to continuously adjust the position of the lens and/or image sensor in real time according to the current shaking situation of the electronic device.
  • the factors that affect the imaging effect of the image are only the time when the image sensor is exposed. Jitter, for the jitter in other non-exposure time, since the image sensor has no imaging, it has no effect.
  • the relevant optical image stabilization technology needs to continuously adjust the lens and/or the image sensor, resulting in unnecessary overhead for electronic equipment.
  • the driver chip can synchronize the attitude information with the synchronization signal of the collected image information, and dynamically control the drive motor according to the synchronized attitude information, thereby avoiding Overhead of image sensor non-exposure time, reducing power consumption of electronic devices.
  • the driving chip determines the target signal from the synchronous signal of the image information; according to the target signal, the driving motor is controlled to stop driving the lens and/or the image sensor to move.
  • the driver chip when it receives the horizontal synchronous signal (target signal) of the last row of each frame to stop the exposure, it turns off the control function of the driver chip for the drive motor, and when it receives the horizontal synchronous signal of the first row of each frame to start exposure, it turns on the drive chip.
  • the chip's control function for the drive motor can make the drive chip work only when the frame image is exposed, thereby reducing the power consumption of the overall system.
  • the information synchronization method provided by an embodiment of the present application can control the drive motor to drive the lens and/or the movement of the image sensor according to the synchronization signal of the image information when the image sensor is exposed, so as to realize the optical anti-shake.
  • the image sensor is in the non-exposure time period, and the driving lens and/or the movement of the image sensor is stopped, which can reduce the power consumption of the system when optical image stabilization is implemented.
  • the synchronization of the attitude information is realized through the driver chip according to the synchronization signal of the image information and the acquired attitude information.
  • the synchronization method of the hardware will improve the accuracy of synchronization between attitude information and image information. Further, the accuracy of electronic anti-shake processing image frame data according to the synchronized posture information is improved.
  • optical anti-shake + electronic anti-shake that is, further anti-shake processing of electronic anti-shake on the module with optical anti-shake function
  • it can not only reduce the power consumption of the optical anti-shake module, but also improve Electronic anti-shake data processing is accurate.
  • FIG. 10 is a structural block diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device provided by the present application may also include: a display screen 140, a radio frequency circuit 150, an audio circuit 160, an input unit 170, and a power supply 180 .
  • a display screen 140 may also include: a radio frequency circuit 150, an audio circuit 160, an input unit 170, and a power supply 180 .
  • Those skilled in the art can understand that the structure of the computer device shown in FIG. 10 does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
  • the display screen 140 can be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface.
  • the display screen 140 may include a display panel and a touch panel.
  • the display panel can be used to display information input by or provided to the user and various graphical user interfaces of the computer equipment. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof.
  • the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like.
  • the touch panel can be used to collect user's touch operations on or near it, and generate corresponding operation instructions, and the operation instructions execute corresponding programs.
  • the radio frequency circuit 150 can be used to send and receive radio frequency signals to establish wireless communication with network equipment or other computer equipment through wireless communication, and to send and receive signals with network equipment or other computer equipment.
  • the audio circuit 160 may be used to provide an audio interface between the user and the computer device through speakers, microphones.
  • the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted by the audio circuit 160 After the audio data is output and processed, the audio data is sent to another computer device through the radio frequency circuit 150 .
  • Audio circuitry 160 may also include an earphone jack to provide communication of peripheral headphones with the computer device.
  • the input unit 170 can be used to receive input numbers, character information or user characteristic information (such as fingerprints, irises, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control .
  • character information or user characteristic information such as fingerprints, irises, face information, etc.
  • the power supply 180 is used to supply power to various components of the computer device 400 .
  • the power supply 180 may be logically connected to various electronic components through a power management system, so as to implement functions such as management of charging, discharging, and power consumption through the power management system.
  • the power supply 180 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
  • the computer device 400 may also include a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any one of the information synchronization methods provided in the embodiments of the present application.
  • the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • magnetic disk or an optical disk and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

An electronic device, an information synchronization method, and a storage medium. The electronic device comprises an attitude sensor, an image sensor, and a driver chip; the attitude sensor is configured to collect attitude information; the image sensor is configured to collect image information; the driver chip is connected to the attitude sensor and the image sensor, respectively; the driver chip is configured to obtain synchronization signals of the attitude information and the image information, and synchronize the synchronization signals of the attitude information and the image information to obtain synchronized attitude information.

Description

电子设备、信息同步方法和计算机可读存储介质Electronic device, information synchronization method, and computer-readable storage medium
本申请要求于2021年07月29日提交中国专利局,申请号为202110866304.6、发明名称为“电子设备、信息同步方法和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110866304.6 and the title of the invention "electronic device, information synchronization method, and computer-readable storage medium" submitted to the China Patent Office on July 29, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及图像处理技术领域,特别涉及一种电子设备、信息同步方法和计算机可读存储介质。The present application relates to the technical field of image processing, and in particular to an electronic device, an information synchronization method, and a computer-readable storage medium.
背景技术Background technique
目前,如手机、平板电脑等电子设备通常配置有摄像头,从而为用户提供拍照功能,使得用户能够通过这些电子设备随时随地的记录身边发生的事情,看到的景物等。然而,由于用户通常手持电子设备进行拍摄,而用户手持电子设备会引入不同程度的抖动而影响电子设备拍摄的稳定性,导致拍摄得到的图像的质量较差。此时需要通过电子防抖和/或光学防抖的方式对图像进行补偿。At present, electronic devices such as mobile phones and tablet computers are usually equipped with cameras, so as to provide users with a camera function, so that users can record what is happening around them, the scenery they see, etc. anytime and anywhere through these electronic devices. However, because the user usually holds the electronic device for shooting, and the electronic device held by the user will introduce different degrees of shaking and affect the stability of the shooting of the electronic device, resulting in poor quality of the captured image. In this case, the image needs to be compensated by means of electronic image stabilization and/or optical image stabilization.
发明内容Contents of the invention
本申请实施例提供一种电子设备、信息同步方法和计算机可读存储介质,能够提高图像信息与姿态信息同步的准确性。Embodiments of the present application provide an electronic device, an information synchronization method, and a computer-readable storage medium, which can improve the accuracy of synchronization between image information and posture information.
本申请实施例提供一种电子设备,所述电子设备包括:An embodiment of the present application provides an electronic device, and the electronic device includes:
姿态传感器,用于采集姿态信息;Attitude sensor for collecting attitude information;
图像传感器,用于采集图像信息;An image sensor for collecting image information;
驱动芯片,分别与所述姿态传感器和所述图像传感器连接,所述驱动芯片用于获取所述姿态信息以及所述图像信息的同步信号,将所述姿态信息和所述图像信息的同步信号进行同步,以得到同步后的姿态信息。A driver chip, connected to the attitude sensor and the image sensor respectively, the driver chip is used to obtain the attitude information and the synchronization signal of the image information, and perform the synchronization signal of the attitude information and the image information Synchronize to obtain the synchronized attitude information.
本申请实施例提供一种信息同步方法,应用于电子设备,所述电子设备包括驱动芯片、图像传感器以及姿态传感器,所述信息同步方法包括:An embodiment of the present application provides an information synchronization method, which is applied to an electronic device. The electronic device includes a driver chip, an image sensor, and an attitude sensor. The information synchronization method includes:
通过所述姿态传感器采集姿态信息;collecting attitude information through the attitude sensor;
通过图像传感器采集图像信息;Collect image information through the image sensor;
通过所述驱动芯片获取所述姿态信息以及所述图像信息的同步信号;Obtaining the attitude information and the synchronization signal of the image information through the driving chip;
将所述姿态信息和所述图像信息的同步信号进行同步,得到同步后的姿态信息。Synchronizing the posture information and the synchronization signal of the image information to obtain synchronized posture information.
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的信息同步方法的步骤。An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the information synchronization method described above are implemented.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments.
图1为本申请一实施例提供的电子设备的结构示意图。FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图2为本申请一实施例提供的电子设备的结构框图。Fig. 2 is a structural block diagram of an electronic device provided by an embodiment of the present application.
图3为本申请一实施例提供的电子设备的结构框图。Fig. 3 is a structural block diagram of an electronic device provided by an embodiment of the present application.
图4为本申请一实施例提供的电子设备的结构框图。Fig. 4 is a structural block diagram of an electronic device provided by an embodiment of the present application.
图5为本申请一实施例提供的图像传感器逐行曝光的示意图。FIG. 5 is a schematic diagram of progressive exposure of an image sensor provided by an embodiment of the present application.
图6为本申请一实施例提供的图像传感器的帧间时序图。FIG. 6 is a timing diagram between frames of an image sensor provided by an embodiment of the present application.
图7为本申请一实施例提供的驱动芯片的内部设计和外部连线的示意图。FIG. 7 is a schematic diagram of the internal design and external wiring of the driver chip provided by an embodiment of the present application.
图8为本申请一实施例提供的信息同步方法的流程示意图。FIG. 8 is a schematic flowchart of an information synchronization method provided by an embodiment of the present application.
图9为本申请一实施例提供的信息同步方法的流程示意图。FIG. 9 is a schematic flowchart of an information synchronization method provided by an embodiment of the present application.
图10为本申请一实施例提供的电子设备的结构框图。Fig. 10 is a structural block diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
应当说明的是,本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了 一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。It should be noted that the terms "first", "second" and "third" in this application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments Other steps or modules inherent to these processes, methods, products or devices are also included.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本申请实施例提供一种电子设备,所述电子设备包括:An embodiment of the present application provides an electronic device, and the electronic device includes:
姿态传感器,用于采集姿态信息;Attitude sensor for collecting attitude information;
图像传感器,用于采集图像信息;An image sensor for collecting image information;
驱动芯片,分别与所述姿态传感器和所述图像传感器连接,所述驱动芯片用于获取所述姿态信息以及所述图像信息的同步信号,并将所述姿态信息和所述图像信息的同步信号进行同步,以得到同步后的姿态信息。A driver chip, connected to the attitude sensor and the image sensor respectively, the driver chip is used to obtain the attitude information and the synchronization signal of the image information, and transfer the attitude information and the synchronization signal of the image information Synchronize to obtain the synchronized attitude information.
本申请的一种可选实施例中,所述驱动芯片包括缓冲存储器和寄存器,所述寄存器与所述姿态传感器连接,所述寄存器用于寄存从所述姿态传感器获取的姿态信息,所述缓冲存储器分别与所述寄存器和所述图像传感器连接,所述缓冲存储器用于从所述寄存器获取所述姿态信息以及从所述图像传感器获取所述图像信息的同步信号,以将获取到的所述姿态信息和所述图像信息的同步信号进行同步。In an optional embodiment of the present application, the driver chip includes a buffer memory and a register, the register is connected to the attitude sensor, the register is used to register the attitude information obtained from the attitude sensor, and the buffer The memory is respectively connected to the register and the image sensor, and the buffer memory is used to acquire the attitude information from the register and the synchronization signal of the image information from the image sensor, so as to transfer the acquired The gesture information is synchronized with the synchronization signal of the image information.
本申请的一种可选实施例中,所述缓冲存储器通过GPIO接口与所述图像传感器连接,用于获取所述图像信息的同步信号。In an optional embodiment of the present application, the buffer memory is connected to the image sensor through a GPIO interface, and is used to obtain a synchronization signal of the image information.
本申请的一种可选实施例中,所述缓冲存储器还通过第一SPI接口与所述图像传感器连接,用于将所述同步后的姿态信息发送至所述图像传感器。In an optional embodiment of the present application, the buffer memory is further connected to the image sensor through a first SPI interface, and is configured to send the synchronized posture information to the image sensor.
本申请的一种可选实施例中,所述寄存器通过第二SPI接口与所述姿态传感器连接,用于获取所述姿态信息。In an optional embodiment of the present application, the register is connected to the attitude sensor through a second SPI interface, and is used to acquire the attitude information.
本申请的一种可选实施例中,所述图像信息的同步信号包括帧同步信号和曝光行同步信号,所述图像传感器用于将所述帧同步信号和曝光行同步信号发送至所述驱动芯片,所述驱动芯片用于在获取到所述姿态信息时,根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值。In an optional embodiment of the present application, the synchronous signal of the image information includes a frame synchronous signal and an exposure line synchronous signal, and the image sensor is used to send the frame synchronous signal and the exposure line synchronous signal to the driver chip, the drive chip is used to assign a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal when the attitude information is acquired.
本申请的一种可选实施例中,所述驱动芯片用于根据所述帧同步信号得到帧中断信号,根据所述曝光行同步信号得到行中断信号,根据所述帧中断信号和所述行中断信号对获取到的姿态信息赋值。In an optional embodiment of the present application, the driver chip is used to obtain a frame interruption signal according to the frame synchronization signal, obtain a row interruption signal according to the exposure row synchronization signal, and obtain a row interruption signal according to the frame interruption signal and the row The interrupt signal assigns a value to the acquired attitude information.
本申请的一种可选实施例中,所述电子设备还包括驱动马达和镜头,所述驱动芯片与所述驱动马达连接;In an optional embodiment of the present application, the electronic device further includes a driving motor and a lens, and the driving chip is connected to the driving motor;
所述驱动芯片还用于根据获取的姿态信息计算得到第一补偿数据,所述驱动马达用于根据所述第一补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The drive chip is also used to calculate first compensation data according to the acquired posture information, and the drive motor is used to drive the lens and/or the image sensor to move according to the first compensation data to achieve optical anti-shake.
本申请的一种可选实施例中,所述电子设备还包括驱动马达和镜头,所述驱动芯片与所述驱动马达连接;In an optional embodiment of the present application, the electronic device further includes a driving motor and a lens, and the driving chip is connected to the driving motor;
所述驱动芯片还用于接收第二补偿数据,所述驱动马达用于根据所述第二补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The driving chip is further used to receive second compensation data, and the driving motor is used to drive the lens and/or the image sensor to move according to the second compensation data to achieve optical anti-shake.
本申请的一种可选实施例中,所述电子设备还包括驱动马达,所述驱动芯片与所述驱动马达连接,所述驱动芯片还用于从所述图像信息的同步信号中确定出目标信号,所述驱动芯片根据所述目标信号关闭所述驱动马达的控制功能。In an optional embodiment of the present application, the electronic device further includes a drive motor, the drive chip is connected to the drive motor, and the drive chip is also used to determine the target from the synchronization signal of the image information signal, the drive chip turns off the control function of the drive motor according to the target signal.
本申请的一种可选实施例中,所述电子设备还包括应用处理器,所述应用处理器用于获取所述同步后的姿态信息,以根据所述同步后的姿态信息实现电子防抖和/或光学防抖。In an optional embodiment of the present application, the electronic device further includes an application processor, and the application processor is configured to obtain the synchronized posture information, so as to implement electronic anti-shake and / or optical image stabilization.
本申请的一种可选实施例中,所述姿态传感器包括加速度计、霍尔传感器、陀螺仪、磁力计以及重力计中的一种或多种。In an optional embodiment of the present application, the attitude sensor includes one or more of an accelerometer, a Hall sensor, a gyroscope, a magnetometer, and a gravimeter.
本申请还提供一种信息同步方法,应用于电子设备,所述电子设备包括驱动芯片、图像传感器以及姿态传感器,所述信息同步方法包括:The present application also provides an information synchronization method, which is applied to an electronic device, and the electronic device includes a driver chip, an image sensor, and an attitude sensor, and the information synchronization method includes:
通过所述姿态传感器采集姿态信息;collecting attitude information through the attitude sensor;
通过图像传感器采集图像信息;Collect image information through the image sensor;
通过所述驱动芯片获取所述姿态信息以及所述图像信息的同步信号;Obtaining the attitude information and the synchronization signal of the image information through the driving chip;
将所述姿态信息和所述图像信息的同步信号进行同步,得到同步后的姿态信息。Synchronizing the posture information and the synchronization signal of the image information to obtain synchronized posture information.
本申请的一种可选实施例中,所述驱动芯片包括缓冲存储器和寄存器,所述通过所述驱动芯片获取所述姿态信息以及所述图像信息的同步信号包括:In an optional embodiment of the present application, the driver chip includes a buffer memory and a register, and the acquisition of the synchronization signal of the posture information and the image information through the driver chip includes:
通过所述寄存器获取所述姿态信息;Obtaining the attitude information through the register;
通过所述缓冲存储器获取所述图像信息的同步信号;acquiring a synchronization signal of the image information through the buffer memory;
所述寄存器在获取到所述姿态信息时将所述姿态信息缓冲至所述缓冲存储器;The register buffers the attitude information to the buffer memory when the attitude information is acquired;
在所述缓冲存储器缓冲到所述姿态信息时,将接收到的所述图像信息的同步信号与缓冲到的姿态信息同步。When the buffer memory buffers the posture information, the received synchronization signal of the image information is synchronized with the buffered posture information.
本申请的一种可选实施例中,所述图像信息的同步信号包括帧同步信号和曝光行同步信号,所述将所述姿态信息和所述图像信息的同步信号进行同步包括:In an optional embodiment of the present application, the synchronization signal of the image information includes a frame synchronization signal and an exposure line synchronization signal, and the synchronizing the posture information and the synchronization signal of the image information includes:
所述驱动芯片在获取到所述姿态信息时,根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值。When the drive chip acquires the attitude information, it assigns a value to the acquired attitude information according to the frame synchronization signal and the exposure row synchronization signal.
本申请的一种可选实施例中,所述根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值包括:In an optional embodiment of the present application, the assigning the acquired posture information according to the frame synchronization signal and the exposure line synchronization signal includes:
根据所述帧同步信号得到帧中断信号;obtaining a frame interruption signal according to the frame synchronization signal;
根据所述曝光行同步信号得到行中断信号;Obtaining a line interruption signal according to the exposure line synchronization signal;
根据所述帧中断信号和所述行中断信号对获取到的姿态信息进行赋值。Assigning the acquired attitude information according to the frame interruption signal and the line interruption signal.
本申请的一种可选实施例中,所述电子设备还包括驱动马达和镜头,所述信息同步方法还包括:In an optional embodiment of the present application, the electronic device further includes a drive motor and a lens, and the information synchronization method further includes:
通过所述驱动芯片根据获取到的姿态信息计算得到第一补偿数据,通过所述驱动马达根据所述第一补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖;或Using the drive chip to calculate first compensation data according to the acquired attitude information, and using the drive motor to drive the lens and/or the image sensor to move according to the first compensation data to achieve optical anti-shake; or
通过所述驱动芯片接收第二补偿数据,通过所述驱动马达根据所述第二补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The second compensation data is received by the drive chip, and the lens and/or the image sensor are driven to move by the drive motor according to the second compensation data to achieve optical anti-shake.
本申请的一种可选实施例中,所述方法还包括:In an optional embodiment of the present application, the method further includes:
所述驱动芯片从所述图像信息的同步信号中确定出目标信号;The drive chip determines the target signal from the synchronization signal of the image information;
根据所述目标信号控制所述驱动马达停止驱动所述镜头和/或所述图像传感器。The driving motor is controlled to stop driving the lens and/or the image sensor according to the target signal.
本申请的一种可选实施例中,所述电子设备还包括应用处理器,在所述得到同步后的姿态信息之后,所述信息同步方法还包括:In an optional embodiment of the present application, the electronic device further includes an application processor, and after the synchronized posture information is obtained, the information synchronization method further includes:
将所述同步后的姿态信息发送至所述图像传感器;sending the synchronized attitude information to the image sensor;
所述图像传感器将所述同步后的姿态信息发送至所述应用处理器;The image sensor sends the synchronized attitude information to the application processor;
所述应用处理器根据所述同步后的姿态信息实现电子防抖和/或光学防抖。The application processor implements electronic anti-shake and/or optical anti-shake according to the synchronized attitude information.
本申请实施例提供一种电子设备、信息同步方法和计算机可读存储介质,其中信息同步方法的执行主体可以是本申请实施例提供的电子设备,其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑等配置有处理器而具有数据处理能力的设备。An embodiment of the present application provides an electronic device, an information synchronization method, and a computer-readable storage medium, wherein the execution body of the information synchronization method may be the electronic device provided in the embodiment of the present application, wherein the electronic device may be a smart phone, a tablet computer, Handheld computers, notebook computers and other devices equipped with processors and capable of data processing.
下面将结合附图对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.
请参阅图1和图2,图1为本申请一实施例提供的电子设备的结构示意图,图2为本申请一实施例提供的电子设备的结构框图,电子设备10包括:图像传感器110、姿态传感器120以及驱动芯片130,电子设备10可以为具有拍摄功能的智能手机,其中图像传感器110用于在电子设备10拍摄时采集图像信息,姿态传感器用于采集电子设备10的姿态信息。驱动芯片130分别与图像传感器110和姿态传感器120连接,驱动芯片130用于获取姿态信息以及图像信息的同步信号,将姿态信息和所述图像信息的同步信号进行同步,以得到同步后的姿态信息。Please refer to Figure 1 and Figure 2, Figure 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application, Figure 2 is a structural block diagram of an electronic device provided by an embodiment of the present application, the electronic device 10 includes: an image sensor 110, a gesture The sensor 120 and the driver chip 130 , the electronic device 10 can be a smart phone with a camera function, wherein the image sensor 110 is used to collect image information when the electronic device 10 is shooting, and the attitude sensor is used to collect the attitude information of the electronic device 10 . The driver chip 130 is connected with the image sensor 110 and the attitude sensor 120 respectively, and the driver chip 130 is used to obtain the synchronization signal of the attitude information and the image information, and synchronize the attitude information and the synchronization signal of the image information to obtain the synchronized attitude information .
其中,图像传感器110可以利用光电器件的光电转换功能将感光面上的光像转换为与光像成相应比例关系的电信号。图像传感器可以采集图像信息,采集图像信息的同时可以生成同步信号,其中,同步信号可以为在采集图像信息时生成的提供时间参考的同步信号。Wherein, the image sensor 110 can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image. The image sensor can collect image information, and can generate a synchronous signal while collecting the image information, wherein the synchronous signal can be a synchronous signal that provides a time reference and is generated when the image information is collected.
其中,姿态传感器120可以采集电子设备的姿态信息,姿态信息可以反映电子设备的运动变化以及位置变化,姿态传感器可以在接收到采集信号后采集姿态信息,例如,在电子设备处于拍摄状态时,向姿态传感器发送采集信号,姿态传感器采集电子设备的姿态信息。姿态传感器也可以在电子设备上电后 实时采集姿态信息,例如电子设备开机后,姿态传感器采集电子设备的姿态信息。Wherein, the posture sensor 120 can collect posture information of the electronic device, and the posture information can reflect the movement change and position change of the electronic device, and the posture sensor can collect posture information after receiving the collection signal, for example, when the electronic device is in the shooting state, The attitude sensor sends a collection signal, and the attitude sensor collects attitude information of the electronic device. The attitude sensor can also collect attitude information in real time after the electronic equipment is powered on, for example, after the electronic equipment is turned on, the attitude sensor collects the attitude information of the electronic equipment.
其中,驱动芯片130往往用于实现光学防抖,在图像传感器采集图像信号时,根据获取的姿态传感器的姿态信息对光学元器件进行驱动,避免或者减少图像传感器扑捉光学信号过程中出现的仪器抖动现象,从而提高成像质量。本申请实施例提供的驱动芯片还用于实现姿态信息的同步,得到同步后的姿态信息,用于实现电子防抖。Among them, the driver chip 130 is often used to achieve optical image stabilization. When the image sensor collects image signals, the optical components are driven according to the acquired attitude information of the attitude sensor, so as to avoid or reduce the occurrence of the image sensor in the process of capturing optical signals. Jitter phenomenon, thereby improving image quality. The driver chip provided in the embodiment of the present application is also used to realize the synchronization of posture information, and obtain the synchronized posture information, which is used to realize electronic anti-shake.
相关技术中,往往通过软件为图像信息和姿态信息生成时间戳,通过时间对齐的方式将图像信息和姿态信息进行同步的方式,由于不同硬件结构中的时钟源的不同,容易造成同步误差。In related technologies, software is often used to generate time stamps for image information and attitude information, and to synchronize image information and attitude information through time alignment. Due to different clock sources in different hardware structures, it is easy to cause synchronization errors.
相较于通过时间戳将图像信息和姿态信息同步会造成误差的软件同步的方式,本申请实施例提供的电子设备通过驱动芯片将图像信息的同步信号与姿态信息进行同步,通过硬件同步的方式,可以提高姿态信息与图像信息同步的准确性。Compared with the software synchronization method that synchronizes image information and attitude information through time stamps, which may cause errors, the electronic device provided in the embodiment of the present application uses a driver chip to synchronize the synchronization signal of image information with attitude information, and through hardware synchronization. , which can improve the accuracy of synchronization between pose information and image information.
在一些实施例中,电子设备还包括镜头、驱动马达以及应用处理器,请参照图3,图3为本申请一实施例提供的电子设备的结构框图。In some embodiments, the electronic device further includes a lens, a driving motor, and an application processor. Please refer to FIG. 3 , which is a structural block diagram of an electronic device provided by an embodiment of the present application.
姿态传感器可以采集电子设备的姿态信息,姿态传感器可以包括霍尔传感器(Hall)、陀螺仪(Gyro)、加速度计(Acc)、磁力计(Magenatic)以及重力计(Gravity)中的一种或多种,当然还可以包括其他类型的姿态传感器,姿态信息可以反映电子设备的运动变化以及位置变化,姿态传感器可以在接收到采集信号后采集姿态信息,例如,在电子设备处于拍摄状态时,向姿态传感器发送采集信号,姿态传感器采集电子设备的姿态信息。姿态传感器也可以在电子设备上电后实时采集姿态信息,例如电子设备开机后,姿态传感器采集电子设备的姿态信息。The attitude sensor can collect attitude information of the electronic device, and the attitude sensor can include one or more of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravity meter (Gravity). Of course, it can also include other types of attitude sensors. The attitude information can reflect the movement and position changes of the electronic device. The attitude sensor can collect the attitude information after receiving the acquisition signal. The sensor sends a collection signal, and the attitude sensor collects attitude information of the electronic device. The attitude sensor can also collect attitude information in real time after the electronic device is powered on, for example, after the electronic device is turned on, the attitude sensor collects the attitude information of the electronic device.
驱动芯片分别与姿态传感器和驱动马达连接,驱动马达可驱动镜头和/或图像传感器运动,以实现光学防抖,示例性的,驱动芯片可以作为驱动马达的控制模块,驱动马达可以包括控制镜头对焦的马达、控制镜头运动实现光学补偿的马达和/或控制图像传感器运动的马达。驱动芯片作为控制模块,可以包含有基于光学补偿的控制算法,驱动芯片可以根据读取到的姿态信息计算得到驱动马达的驱动量,以使驱动马达驱动镜头和/或图像传感器运动,以实现光学防抖。在一些实施例中,驱动芯片实现光学防抖的控制逻辑可以如下:The drive chip is connected to the attitude sensor and the drive motor respectively, and the drive motor can drive the lens and/or the image sensor to move to achieve optical image stabilization. Exemplarily, the drive chip can be used as a control module for the drive motor, and the drive motor can include controlling the focus of the lens motors, motors that control lens motion for optical compensation, and/or motors that control image sensor motion. As a control module, the drive chip can include a control algorithm based on optical compensation. The drive chip can calculate the drive amount of the drive motor according to the read attitude information, so that the drive motor can drive the lens and/or the image sensor to move, so as to realize optical compensation. anti-shake. In some embodiments, the control logic for the driver chip to implement optical image stabilization may be as follows:
驱动芯片读取姿态传感器(Gyro、Acc、Mag和/或Gravity)的姿态信息后,对读取到的姿态信息进行滤波操作,得到滤波后的姿态信息,将滤波后的姿态信息进行积分和增益操作,用于计算出电子设备的抖动量,驱动芯片通过霍尔传感器(Hall)获取当前镜头和/或图像传感器的位置信息,获取的是镜头位置信息还是图像传感器的位置信息,还是镜头位置信息和图像传感器的位置,与霍尔传感器的数量以及位置有关。驱动芯片根据电子设备的抖动量以及镜头和/或图像传感器当前的位置信息计算得到镜头和/或图像传感器的光学补偿数据(如第一补偿数据),根据第一补偿数据向驱动马达发送驱动信号,来使能驱动马达驱动镜头和/或图像传感器运动以移动到目标位置,以实现光学防抖。其中,通过驱动芯片实现光学防抖是一个实时高频的反馈控制过程,可以通过PID(Proportion Integral Differential)控制来使驱动马达稳定的驱动镜头和/或图像传感器到目标位置。After the driver chip reads the attitude information of the attitude sensor (Gyro, Acc, Mag and/or Gravity), it performs a filtering operation on the read attitude information to obtain the filtered attitude information, and integrates and gains the filtered attitude information Operation, used to calculate the amount of shaking of the electronic device, the driver chip obtains the position information of the current lens and/or image sensor through the Hall sensor (Hall), whether it is the position information of the lens or the position information of the image sensor, or the position information of the lens And the position of the image sensor is related to the number and position of the Hall sensor. The drive chip calculates the optical compensation data (such as first compensation data) of the lens and/or image sensor according to the shake amount of the electronic device and the current position information of the lens and/or image sensor, and sends a drive signal to the drive motor according to the first compensation data , to enable the drive motor to drive the lens and/or the image sensor to move to a target position, so as to achieve optical image stabilization. Among them, the realization of optical image stabilization through the drive chip is a real-time high-frequency feedback control process, and the drive motor can stably drive the lens and/or image sensor to the target position through PID (Proportion Integral Differential) control.
相关的光学防抖技术中,驱动芯片只需要根据电子设备当前的抖动情况持续实时调整镜头和/或图像传感器的位置,然而,影响图像成像效果的因素只是图像传感器在曝光的那个时间电子设备的抖动,对于其他非曝光时间内的抖动由于图像传感器没有成像,因此没有影响。相关光学防抖技术中需要持续地对镜头和/或图像传感器进行调整,造成电子设备不必要的开销。In the related optical anti-shake technology, the driver chip only needs to continuously adjust the position of the lens and/or image sensor in real time according to the current shaking situation of the electronic device. However, the factors that affect the imaging effect of the image are only the time when the image sensor is exposed. Jitter, for the jitter in other non-exposure time, since the image sensor has no imaging, it has no effect. The relevant optical image stabilization technology needs to continuously adjust the lens and/or the image sensor, resulting in unnecessary overhead for electronic equipment.
基于此,为了减少电子设备不必要的开销,降低电子设备的功耗,驱动芯片可以通过将姿态信息和采集图像信息的同步信号进行同步,根据同步后的姿态信息动态控制驱动马达,从而避免在图像传感器非曝光时间的开销,降低电子设备的功耗。Based on this, in order to reduce the unnecessary overhead of electronic equipment and reduce the power consumption of electronic equipment, the driver chip can synchronize the attitude information with the synchronization signal of the collected image information, and dynamically control the drive motor according to the synchronized attitude information, thereby avoiding Overhead of image sensor non-exposure time, reducing power consumption of electronic devices.
驱动芯片还和图像传感器连接,用于获取图像传感器采集图像信息的同步信号,在图像传感器采集图像信号时生成图像信息的同步信号,并将图像信息的同步信号发送至驱动芯片,驱动芯片接收到图像信息的同步信号后,将当前从姿态传感器获取的姿态信息与图像信息的同步信号进行同步,得到同步后的姿态信息,驱动芯片根据同步后的姿态信息通过上述方式动态控制驱动马达,使得驱动芯片和驱动马达在图像传感器曝光时间段内实现光学防抖。The driver chip is also connected to the image sensor for obtaining the synchronization signal of the image information collected by the image sensor, generating the synchronization signal of the image information when the image sensor collects the image signal, and sending the synchronization signal of the image information to the driver chip, and the driver chip receives After the synchronization signal of the image information, the current attitude information obtained from the attitude sensor is synchronized with the synchronization signal of the image information to obtain the synchronized attitude information, and the drive chip dynamically controls the drive motor through the above method according to the synchronized attitude information, so that the drive The chip and drive motor achieve optical image stabilization during the exposure time of the image sensor.
在一些实施例中,驱动芯片在得到同步后的姿态信息后,将同步后的姿态信息发送至图像传感器,图像传感器将同步后的姿态信息发送至应用处理器,应用处理器根据同步后的姿态信息实现电子防抖,电子防抖处理是指利用边缘图像进行补偿的防抖处理。具体地,EIS(Electric Image Stabilization,电子防 抖)需要依赖电子设备的姿态信息和采集的图像信息进行同步,需要对应每一帧图像信息所对应的其拍摄时的电子设备的姿态。应用处理器在获取到同步后的姿态信息后,根据同步后的姿态信息通过算法对采集的图像信息进行处理。In some embodiments, after the driver chip obtains the synchronized posture information, it sends the synchronized posture information to the image sensor, and the image sensor sends the synchronized posture information to the application processor, and the application processor sends the synchronized posture information to the application processor according to the synchronized posture information. Information realizes electronic anti-shake, and electronic anti-shake processing refers to anti-shake processing that uses edge images for compensation. Specifically, EIS (Electric Image Stabilization, Electronic Image Stabilization) needs to rely on the attitude information of the electronic device to synchronize with the collected image information, and needs to correspond to the attitude of the electronic device when it is shot corresponding to each frame of image information. After acquiring the synchronized attitude information, the application processor processes the collected image information through an algorithm according to the synchronized attitude information.
请继续参阅图4,图4为本申请一实施例提供的电子设备的结构框图。驱动芯片可以通过串行外设接口(SPI接口)与姿态传感器连接,以获取姿态传感器采集的姿态信息,驱动芯片可以通过通用型输入输出接口(GPIO接口)与图像传感器连接,驱动芯片通过GPIO接口获取图像传感器采集图像信息时生成的同步信号,其中,同步信号可以为图像传感器采集图像信息时生成的同步信号,同步信号可以包括帧同步信号和曝光行同步信号。Please continue to refer to FIG. 4 , which is a structural block diagram of an electronic device provided by an embodiment of the present application. The driver chip can be connected to the attitude sensor through a serial peripheral interface (SPI interface) to obtain the attitude information collected by the attitude sensor. The driver chip can be connected to the image sensor through a general-purpose input and output interface (GPIO interface). A synchronous signal generated when the image sensor collects image information is acquired, wherein the synchronous signal may be a synchronous signal generated when the image sensor collects image information, and the synchronous signal may include a frame synchronous signal and an exposure line synchronous signal.
例如,图像传感器可以通过逐行曝光的方式采集图像信息,图像传感器可以通过卷帘快门通过逐行曝光的方式采集图像信息,对于采用逐行曝光的方式采集图像信息来说,每帧图像的每一行是依次曝光的,因此在采集每一行图像信息时,电子设备的姿态信息可以是相同也可以是不同的,对于每一行图像信息来说,对应的姿态信息为该行曝光时间段内姿态传感器采集到的姿态信息,其中,由于图像传感器内部存在自主控制的图像帧的时序,帧同步信号可以是指垂直同步脉冲信号(Vertical synchronization,Vsync),图像传感器每获取一次图像帧数据,则生成一次帧同步信号,帧同步信号反映图像传感器当前曝光图像帧的帧号,曝光行同步信号可以是指水平同步脉冲信号(Horizontal synchronization,Hsync),图像传感器通过逐行曝光的方式采集图像信息,每曝光一行图像帧时,则生成一次曝光行同步信号,曝光行同步信号反映图像传感器当前曝光图像帧的行号。For example, the image sensor can collect image information by row-by-row exposure, and the image sensor can collect image information by row-by-row exposure through the rolling shutter. One line is exposed sequentially, so when collecting each line of image information, the attitude information of the electronic device can be the same or different. For each line of image information, the corresponding attitude information is the attitude sensor within the exposure time period of the line. The collected attitude information, wherein, due to the timing of the image frame that is independently controlled inside the image sensor, the frame synchronization signal can refer to a vertical synchronization pulse signal (Vertical synchronization, Vsync), and the image sensor generates once every time the image sensor acquires image frame data Frame synchronization signal, the frame synchronization signal reflects the frame number of the current exposure image frame of the image sensor. When one line of image frames is used, an exposure line synchronous signal is generated once, and the exposure line synchronous signal reflects the line number of the image sensor currently exposing the image frame.
请继续参阅图5,图5为本申请一实施例提供的图像传感器逐行曝光的示意图。其中,Exposure Time为曝光时间段,SOF为数据读出时间点,Read out Time为数据读出需要的时间段,Hsync表示的是每一行曝光进行一半的时间点生成的行同步信号,Vsync表示的是整帧图像曝光到中间行时曝光进行一半的时间点生成的帧同步信号。Please continue to refer to FIG. 5 , which is a schematic diagram of progressive exposure of an image sensor provided by an embodiment of the present application. Among them, Exposure Time is the exposure time period, SOF is the time point for data readout, Read out Time is the time period required for data readout, Hsync represents the line synchronization signal generated at the time point when each row is half exposed, and Vsync represents It is the frame synchronization signal generated at the time point when the whole frame image is exposed to the middle line when the exposure is halfway through.
当图像传感器开始逐行曝光采集图像信号时,每生成一次帧同步信号(Vsync)和曝光行同步信号(Hsync)时将帧同步信号和曝光行同步信号发送至驱动芯片,驱动芯片的GPIO接口接收到图像传感器发送帧同步信号时,生成对应的帧中断信号,GPIO接口接收到图像传感器发送的行同步信号时,生成对应的行中断信号,根据行中断信号和帧中断信号对从姿态传感器获取到的姿态信息进行赋值,例如,图像传感器曝光第一帧图像的第一行时,向驱动芯片发送帧同步信号以及曝光行同步信号,驱动芯片的GPIO接口接收到帧同步信号后生成第一帧图像对应的帧中断信号,驱动芯片的GPIO接收到曝光行同步信号后生成第一帧图像第一行对应的行中断信号,根据帧中断信号以及行中断信号对从姿态传感器获取到的第一姿态信息进行赋值,帧中断信号和行中断信号可以反映对应的帧号和行号,以建立帧号、行号以及第一姿态信息之间的映射关系,得到同步后的姿态信息,后续可以通过第一帧图像信息的帧号以及第一行的行号对齐到第一姿态信息。又例如,图像传感器曝光第一帧图像的第二行时,向驱动芯片发送帧同步信号以及曝光行同步信号,驱动芯片的GPIO接口接收到帧同步信号后生成第一帧图像对应的帧中断信号,驱动芯片的GPIO接口接收到曝光行同步信号后生成第一帧图像第二行对应的行中断信号,根据帧中断信号以及行中断信号对从姿态传感器获取到的第二姿态信息进行赋值,帧中断信号和行中断信号可以反映对应的帧号和行号,以建立帧号、行号以及第二姿态信息之间的映射关系,得到同步后的姿态信息,后续可以通过第一帧图像信息的帧号以及第二行的行号对齐到第二姿态信息。When the image sensor starts to expose and collect image signals row by row, the frame sync signal and exposure row sync signal are sent to the driver chip every time the frame sync signal (Vsync) and exposure row sync signal (Hsync) are generated, and the GPIO interface of the driver chip receives When the image sensor sends a frame synchronization signal, a corresponding frame interruption signal is generated. When the GPIO interface receives the line synchronization signal sent by the image sensor, a corresponding line interruption signal is generated. For example, when the image sensor exposes the first line of the first frame image, it sends a frame synchronization signal and an exposure line synchronization signal to the driver chip, and the GPIO interface of the driver chip generates the first frame image after receiving the frame synchronization signal Corresponding to the frame interruption signal, the GPIO of the driver chip generates the line interruption signal corresponding to the first row of the first frame image after receiving the exposure line synchronization signal, and the first attitude information obtained from the attitude sensor is compared according to the frame interruption signal and the line interruption signal. For assignment, the frame interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the first attitude information, and obtain the synchronized attitude information, which can be followed by the first The frame number of the frame image information and the line number of the first line are aligned to the first pose information. For another example, when the image sensor exposes the second row of the first frame image, it sends a frame synchronization signal and an exposure line synchronization signal to the driver chip, and the GPIO interface of the driver chip generates a frame interrupt signal corresponding to the first frame image after receiving the frame synchronization signal , the GPIO interface of the driver chip receives the exposure line synchronization signal and generates the line interruption signal corresponding to the second line of the first frame image, and assigns the second attitude information obtained from the attitude sensor according to the frame interruption signal and the line interruption signal. The interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the second attitude information, and obtain the synchronized attitude information, which can be followed by the first frame of image information. The frame number and the row number of the second row are aligned to the second pose information.
在一些实施例中,由于采样频率的差异,逐行曝光速度较快,一个姿态信息可以对应多行曝光图像信息,例如,在驱动芯片接收从姿态传感器发送的第三姿态信息时,驱动芯片从图像传感器获取到了表示曝光第一帧图像的帧中断信号以及曝光第二十至第三十行的行中断信号,建立第三姿态数据、帧号以及曝光行号的映射关系。接收从姿态传感器发送的第四姿态信息时,驱动芯片接收到了表示曝光第一帧图像的第三十一行至四十行的行中断信号,却没有接收到表示曝光第二帧图像的帧中断信号,建立第四姿态数据、帧号以及曝光行号的映射关系。可以理解的是,帧号和行号可以为驱动芯片内部计数器在接收到帧中断信号和行中断信号后生成的数据标识。数据标识可以为具体的有规律的数值,也可以为其他无规律的数值。需要说明的是,上述同步方式仅仅是示例性的,驱动芯片还可以通过其他硬件同步方式实现姿态信息的同步。In some embodiments, due to the difference in sampling frequency, the row-by-row exposure speed is faster, and one attitude information can correspond to multiple rows of exposure image information. For example, when the driver chip receives the third attitude information sent from the attitude sensor, the driver chip from The image sensor acquires the frame interruption signal representing the exposure of the first frame of image and the line interruption signal of exposing the 20th to 30th lines, and establishes the mapping relationship between the third posture data, the frame number and the exposure line number. When receiving the fourth attitude information sent from the attitude sensor, the driver chip received the line interrupt signal indicating the exposure of the first frame image from the 31st line to the forty line, but did not receive the frame interruption signal indicating the exposure of the second frame image signal to establish a mapping relationship between the fourth pose data, frame number and exposure line number. It can be understood that the frame number and the row number may be data identifiers generated by the internal counter of the driver chip after receiving the frame interrupt signal and the row interrupt signal. The data identifier can be a specific regular value or other irregular value. It should be noted that the above synchronization method is only exemplary, and the driver chip can also realize the synchronization of attitude information through other hardware synchronization methods.
可以理解的是,当驱动芯片获取到姿态信息时,根据行中断信号和帧中断信号对姿态信息进行同步,每一曝光行图像信息对应的姿态信息可以为SOF+Readout_per_line*Line_number–Exposure_time/2的时间点到Readout_per_line*(Line_number+1)–Exposure_time/2的时间点之间的图像信息进行同步, 其中,Readout_per_line为每行数据读出需要的时间段,Line_number为行数,其中,Line_number为自然数。在上述两个时间点之间获取到的姿态信息都可以赋予相应的行号,图像传感器可以控制曝光时长和时序,也控制曝光每一行的读出时序,因此可以准确在一行曝光到一半的时候将曝光行同步信号以及整帧图像曝光到中间行时将帧同步信号发送至驱动芯片。驱动芯片根据曝光行同步信号和帧同步信号实现姿态信息的同步。It can be understood that when the driver chip acquires the posture information, the posture information is synchronized according to the line interruption signal and the frame interruption signal, and the posture information corresponding to each exposure line image information can be SOF+Readout_per_line*Line_number–Exposure_time/2 The image information between the time point and the time point of Readout_per_line*(Line_number+1)–Exposure_time/2 is synchronized, wherein, Readout_per_line is the time period required for reading each line of data, Line_number is the number of lines, and Line_number is a natural number. The attitude information obtained between the above two time points can be assigned to the corresponding line number, and the image sensor can control the exposure time and timing, and also control the readout timing of each line of exposure, so it can be accurate at the time when a line is half exposed Send the frame synchronization signal to the driver chip when the exposure line synchronization signal and the entire frame image are exposed to the middle row. The driver chip realizes the synchronization of attitude information according to the exposure line synchronization signal and the frame synchronization signal.
请结合图5和图6,图6为本申请一实施例提供的图像传感器的帧间时序图。图像传感器采集图像帧(Frame)信息时,快门(Shuttr)开启后生成Hsync和Vsync,其中,曝光至每行中间位置时生成Hsync读出并发送至驱动芯片,在曝光到中间行曝光进行一半的时间点读出(Reaout)并发送至驱动芯片。由于图像传感器每一帧的Vsync驱动芯片都可以接收到,因此可以以相邻两个Vsync之间获取到的姿态信息作为这一帧的姿态信息,并且通过接收到的Hsync表示每一帧各行的姿态信息。Vsync可以标识这一帧的第一个姿态信息,直到识别出曝光至这一帧的最后一行的目标信号(Hsync)标识这一帧最后一个姿态信息。可以通过在接收到每帧最后一行的目标信号停止曝光时关闭驱动芯片对于驱动马达的控制功能,在每帧第一行开始曝光时开启驱动芯片对于驱动马达的控制功能,可以使驱动芯片只在帧图像曝光时序时才进行工作,从而可以降低整体系统的功耗。Please combine FIG. 5 and FIG. 6 , and FIG. 6 is an inter-frame timing diagram of an image sensor provided by an embodiment of the present application. When the image sensor collects image frame (Frame) information, the shutter (Shuttr) is opened to generate Hsync and Vsync. Among them, when the exposure reaches the middle position of each row, Hsync is generated and read out and sent to the driver chip, and half of the exposure is performed when the exposure reaches the middle row. The time point is read out (Reaout) and sent to the driver chip. Since the Vsync driver chip of each frame of the image sensor can receive it, the attitude information obtained between two adjacent Vsyncs can be used as the attitude information of this frame, and the received Hsync represents the position of each line in each frame. attitude information. Vsync can identify the first attitude information of this frame until the target signal (Hsync) that is exposed to the last line of this frame is identified to identify the last attitude information of this frame. The control function of the drive chip for the drive motor can be turned off when the target signal of the last line of each frame is received and the exposure is stopped, and the control function of the drive chip for the drive motor can be turned on when the exposure of the first line of each frame starts, so that the drive chip can only be in the It only works when the frame image is exposed, so that the power consumption of the overall system can be reduced.
请继续参阅图4,在将姿态信息同步后,驱动芯片可以通过SPI接口和图像传感器连接,通过SPI接口将同步后的姿态信息发送至图像传感器,以使图像传感器将图像帧数据与同步后的姿态信息打包形成同步后的信息,图像传感器将同步后的信息发送至应用处理器,其中,图像传感器可以通过移动产业处理器接口(MIPI接口)与应用处理器连接。通过图像处理器接收同步后的姿态信息再与图像帧数据打包发送至应用处理器,不但可以提高姿态信息和图像帧数据时间上的同步的准确性,还可以在整个系统上实现不同数据流的同源获取,进而可以在一个线程中将两种数据进行整合,可以避免通过异步线程获取不同的数据之间的存在的时间差的同步等待处理,降低系统复杂度,提高系统的稳定性。Please continue to refer to Figure 4. After the attitude information is synchronized, the driver chip can be connected to the image sensor through the SPI interface, and the synchronized attitude information can be sent to the image sensor through the SPI interface, so that the image sensor can compare the image frame data with the synchronized The attitude information is packaged to form synchronized information, and the image sensor sends the synchronized information to the application processor, wherein the image sensor can be connected to the application processor through a mobile industry processor interface (MIPI interface). Receive the synchronized attitude information through the image processor and then package it with the image frame data and send it to the application processor, which can not only improve the accuracy of the time synchronization between the attitude information and the image frame data, but also realize the synchronization of different data streams in the whole system Obtaining from the same source can then integrate two kinds of data in one thread, which can avoid synchronous waiting for processing due to the time difference between obtaining different data through asynchronous threads, reduce system complexity, and improve system stability.
应用处理器接收到打包后的数据后进行拆分,将图像帧数据发送至图像处理器,图像处理器可以根据算法以及同步后的姿态信息对采集到的图像信息实现电子防抖,例如根据同步后的姿态信息对图像帧数据进行姿态估计、姿态滤波以及图像扭转等处理,以实现电子防抖,应用处理器还可以根据同步后的姿态信息对驱动芯片进行反馈调节,例如,应用处理器根据同步后的姿态信息获取镜头和/或图像传感器的复位信息,将复位信息发送至驱动芯片,驱动芯片根据复位信息对光学防抖后的镜头和/或图像传感器进行复位,以完成光学防抖。The application processor splits the packaged data after receiving it, and sends the image frame data to the image processor. The image processor can implement electronic anti-shake for the collected image information according to the algorithm and the synchronized attitude information, for example, according to the synchronization The post-posture information performs pose estimation, pose filtering, and image torsion processing on the image frame data to achieve electronic anti-shake. The application processor can also perform feedback adjustment to the driver chip according to the synchronized pose information. The synchronized attitude information obtains the reset information of the lens and/or image sensor, and sends the reset information to the driver chip, and the driver chip resets the optically stabilized lens and/or image sensor according to the reset information to complete the optical image stabilizer.
在一些实施例中,为了减少驱动芯片的数据处理量,应用处理器可以包括光学防抖算法,应用处理器可以获取姿态传感器的姿态信息,根据姿态信息以及光学防抖算法计算得到光学补偿数据(如第二补偿数据),将第二补偿数据发送至驱动芯片,驱动芯片根据第二补偿数据使能驱动马达驱动镜头和/或图像传感器运动以移动到目标位置,以实现光学防抖,驱动芯片只需要执行姿态信息的同步、镜头的驱动以及图像传感器的驱动,涉及到光学防抖的算法可以在应用处理器中执行,可以减少驱动芯片的数据处理量。In some embodiments, in order to reduce the data processing amount of the driver chip, the application processor may include an optical anti-shake algorithm, the application processor may obtain the attitude information of the attitude sensor, and calculate the optical compensation data according to the attitude information and the optical anti-shake algorithm ( Such as the second compensation data), the second compensation data is sent to the driver chip, and the driver chip enables the drive motor to drive the lens and/or the image sensor to move to the target position according to the second compensation data, so as to achieve optical anti-shake, and the driver chip Only the synchronization of attitude information, the driving of the lens and the driving of the image sensor need to be performed, and the algorithm related to optical image stabilization can be executed in the application processor, which can reduce the data processing amount of the driver chip.
请继续参阅图7,图7为本申请一实施例提供的驱动芯片的内部设计和外部连线的示意图。驱动芯片可以包括缓冲存储器和寄存器,寄存器与姿态传感器连接,寄存器用于寄存从姿态传感器获取的姿态信息,缓冲存储器分别与寄存器和图像传感器连接,缓冲存储器用于从寄存器获取姿态信息以及从图像传感器获取图像信息的同步信号,以将获取到的姿态信息和图像信息的同步信号进行同步。Please continue to refer to FIG. 7 , which is a schematic diagram of the internal design and external wiring of the driver chip provided by an embodiment of the present application. The driver chip can include a buffer memory and a register, the register is connected to the attitude sensor, the register is used to store the attitude information obtained from the attitude sensor, the buffer memory is connected to the register and the image sensor respectively, and the buffer memory is used to obtain the attitude information from the register and from the image sensor A synchronization signal of the image information is acquired to synchronize the acquired attitude information with the synchronization signal of the image information.
其中,缓冲存储器可以为先进先出(First Input First Output,FIFO)寄存器,缓冲存储器可以设置有两个GPIO接口,一个GPIO接口用于接收图像传感器发送的帧同步信号(Vsync)的中断信号,一个GPIO接口用于接收图像传感器发送的曝光行同步信号(Hsync)的中断信号。缓冲存储器还设置有第一SPI接口,第一SPI接口可以包括nSC、SDO、SPC以及SOI引脚,相应的,图像传感器可以包括与驱动芯片nSC引脚连接的nSC引脚、与驱动芯片的SDO引脚连接的SDI引脚、与驱动芯片SPC引脚连接的SPC引脚以及与驱动芯片SOI引脚连接的SDO引脚,通过第一SPI接口将同步后的姿态信息发送至图像传感器。Wherein, the buffer memory can be a first-in-first-out (First Input First Output, FIFO) register, and the buffer memory can be provided with two GPIO interfaces, one GPIO interface is used to receive the interrupt signal of the frame synchronization signal (Vsync) sent by the image sensor, one The GPIO interface is used to receive the interrupt signal of the exposure line synchronization signal (Hsync) sent by the image sensor. The buffer memory is also provided with a first SPI interface, the first SPI interface can include nSC, SDO, SPC and SOI pins, and correspondingly, the image sensor can include an nSC pin connected to the driver chip nSC pin, and an SDO pin connected to the driver chip. The SDI pin connected to the pin, the SPC pin connected to the SPC pin of the driver chip, and the SDO pin connected to the SOI pin of the driver chip send the synchronized attitude information to the image sensor through the first SPI interface.
其中,寄存器设置有第二SPI接口,第二SPI接口可以包括多个引脚,如CS1、CS2……CSn引脚、SDO引脚、SPC引脚以及SOI引脚,姿态传感器可以包括加速度计、陀螺仪、磁力计等,姿态传感器上设置有与寄存器引脚对应的引脚,通过将姿态传感器上的引脚与寄存器上的引脚连接,使得寄存器可以获取姿态传感器采集的姿态信息。Wherein, the register is provided with a second SPI interface, and the second SPI interface can include a plurality of pins, such as CS1, CS2 ... CSn pins, SDO pins, SPC pins and SOI pins, and the attitude sensor can include accelerometers, For gyroscopes, magnetometers, etc., the attitude sensor is provided with pins corresponding to the register pins. By connecting the pins on the attitude sensor to the pins on the register, the register can obtain the attitude information collected by the attitude sensor.
在具体的应用场景中,寄存器通过第二SPI接口持续获取姿态传感器采集的姿态信息,将采集到姿 态信息寄存至寄存器中,FIFO存储器读取寄存器中的姿态信息,FIFO存储器接收Vsync的中断信号和Hsync的中断信号,根据Vsync和Hsync的中断信号对读取到的姿态信息赋值,赋值方式可以采取上述的赋值方法,以得到同步后的姿态信息,得到同步后的姿态信息将姿态信息通过第一SPI接口发送至图像传感器,以使图像传感器将姿态信息和图像帧数据进行打包,发送至应用处理器,使应用处理器根据同步后的姿态信息实现电子防抖和/或光学防抖。In a specific application scenario, the register continuously acquires the attitude information collected by the attitude sensor through the second SPI interface, stores the acquired attitude information into the register, the FIFO memory reads the attitude information in the register, and the FIFO memory receives the Vsync interrupt signal and The interrupt signal of Hsync assigns the attitude information read according to the interrupt signal of Vsync and Hsync. The assignment method can adopt the above-mentioned assignment method to obtain the synchronized attitude information. The SPI interface is sent to the image sensor, so that the image sensor packages the attitude information and image frame data, and sends it to the application processor, so that the application processor can realize electronic anti-shake and/or optical anti-shake according to the synchronized attitude information.
驱动芯片与图像传感器通过第一SPI接口连接时,驱动芯片的第一SPI接口处于从模式(slave模式),图像传感器的SPI接口处于主模式(master模式),图像传感器处于主模式的SPI接口用于接收驱动芯片处于从模式的第一SPI接口传输的同步后的姿态信息。When the drive chip and the image sensor were connected by the first SPI interface, the first SPI interface of the drive chip was in slave mode (slave mode), the SPI interface of the image sensor was in master mode (master mode), and the SPI interface of the image sensor was in master mode. To receive the synchronized attitude information transmitted by the first SPI interface of the driver chip in slave mode.
驱动芯片与姿态传感器通过第二SPI接口连接时,驱动芯片的寄存器的第二SPI接口处于主模式(master模式)姿态传感器的SPI接口处于从模式(slave模式),寄存器的处于主模式的第二SPI接口用于接收姿态传感器处于从模式的SPI接口传输的姿态信息,处于主模式的第二SPI接口还可以通过片选信号(CS1、CS2……CSn引脚获取的信号)从多路姿态传感器中读取数据,可以根据实际需求获取姿态传感器的姿态信息,通过驱动芯片主从模式的设计,可以使得驱动芯片与外设之间数据传输具有选择性以及可靠性。When the driver chip and the attitude sensor were connected through the second SPI interface, the second SPI interface of the register of the driver chip was in the master mode (master mode) and the SPI interface of the attitude sensor was in the slave mode (slave mode), and the second SPI interface of the register was in the master mode. The SPI interface is used to receive the attitude information transmitted by the SPI interface of the attitude sensor in the slave mode, and the second SPI interface in the master mode can also pass the chip selection signal (CS1, CS2... CSn pin obtained signal) from the multi-channel attitude sensor By reading the data, the attitude information of the attitude sensor can be obtained according to the actual needs. Through the design of the master-slave mode of the driver chip, the data transmission between the driver chip and the peripheral can be made selective and reliable.
本申请实施例提供一种电子设备,通过驱动芯片实现姿态信息的同步,通过硬件同步的方式,极大地提高了图像帧数据和姿态信息同步的精度和信息处理的一致性,降低了不同设备之间的差异性,还可以降低整体系统功耗。The embodiment of the present application provides an electronic device, which realizes the synchronization of posture information through a driver chip, and greatly improves the synchronization accuracy of image frame data and posture information and the consistency of information processing through hardware synchronization, and reduces the gap between different devices. The difference between them can also reduce the overall system power consumption.
本申请提供的驱动芯片,对于光学防抖的应用来说,可以根据图像信息的同步信号在图像传感器曝光时控制驱动马达驱动镜头和/或图像传感器运动,实现光学防抖,在图像传感器处于非曝光时间段,停止驱动镜头和/或图像传感器运动,可以降低实现光学防抖时系统的功耗。The driver chip provided by this application can control the drive motor to drive the lens and/or the image sensor to move according to the synchronization signal of the image information when the image sensor is exposed, so as to realize the optical anti-shake. During the exposure period, stopping the movement of the lens and/or the image sensor can reduce the power consumption of the system when optical image stabilization is implemented.
对于实现电子防抖的应用来说,通过驱动芯片根据图像信息的同步信号以及获取的姿态信息实现姿态信息的同步,通过硬件的同步方式,相较于通过时间戳将图像信息和姿态信息同步会造成误差的软件同步的方式,可以提高姿态信息与图像信息同步的准确性。进而提高电子防抖根据同步后的姿态信息处理图像帧数据的准确性。For the application of electronic anti-shake, the synchronization of the attitude information is realized through the driver chip according to the synchronization signal of the image information and the acquired attitude information. Compared with the synchronization of the image information and the attitude information through the time stamp, the synchronization method of the hardware will The way of software synchronization that causes errors can improve the accuracy of synchronization between attitude information and image information. Further, the accuracy of electronic anti-shake processing image frame data according to the synchronized posture information is improved.
对于光学防抖+电子防抖(即在具备光学防抖功能的模组上进行电子防抖的进一步防抖处理)的应用来说,不但可以降低光学防抖模组的功耗,还可以提高电子防抖数据处理的准确性。For the application of optical anti-shake + electronic anti-shake (that is, further anti-shake processing of electronic anti-shake on the module with optical anti-shake function), it can not only reduce the power consumption of the optical anti-shake module, but also improve Accuracy of electronic image stabilization data processing.
本申请实施例还提供一种信息同步方法,请参阅图8,图8为本申请一实施例提供的信息同步方法的流程示意图,信息同步方法应用于电子设备,电子设备包括驱动芯片、图像传感器以及姿态传感器,信息同步方法包括:The embodiment of the present application also provides an information synchronization method. Please refer to FIG. 8. FIG. 8 is a schematic flow chart of the information synchronization method provided by an embodiment of the present application. The information synchronization method is applied to electronic equipment, and the electronic equipment includes a driver chip and an image sensor. As well as attitude sensors, information synchronization methods include:
101,通过姿态传感器采集姿态信息。101. Collect attitude information by using an attitude sensor.
其中,姿态传感器可以采集电子设备的姿态信息,姿态传感器可以包括霍尔传感器(Hall)、陀螺仪(Gyro)、加速度计(Acc)、磁力计(Magenatic)以及重力计(Gravity)中的一种或多种,当然还可以包括其他类型的姿态传感器,姿态信息可以反映电子设备的运动变化以及位置变化,姿态传感器可以在接收到采集信号后采集姿态信息,例如,在电子设备处于拍摄状态时,向姿态传感器发送采集信号,姿态传感器采集姿态信息。又例如在电子设备处于上电状态时姿态传感器实时采集姿态信息。Wherein, the attitude sensor can collect the attitude information of the electronic device, and the attitude sensor can include one of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravimeter (Gravity). Or more, of course, can also include other types of attitude sensors. The attitude information can reflect the movement changes and position changes of the electronic equipment. The attitude sensor can collect the attitude information after receiving the collection signal. For example, when the electronic equipment is in the shooting state, The acquisition signal is sent to the attitude sensor, and the attitude sensor collects attitude information. Another example is that the attitude sensor collects attitude information in real time when the electronic device is in a power-on state.
102,通过图像传感器采集图像信息。102. Collect image information by using an image sensor.
图像传感器可以利用光电器件的光电转换功能将感光面上的光像转换为与光像成相应比例关系的电信号。图像传感器可以采集图像信息,例如,图像传感器可以通过逐行曝光的方式采集图像信息,通过卷帘快门通过逐行曝光的方式采集图像信息,对于采用逐行曝光的方式采集图像信息来说,每帧图像的每一行是依次曝光的,因此在采集每一行图像信息时,电子设备的姿态信息可以是相同也可以是不同的,对于每一行图像信息来说,对应的姿态信息为该行曝光时间段内姿态传感器采集到的姿态信息。The image sensor can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image. The image sensor can collect image information. For example, the image sensor can collect image information through progressive exposure, and collect image information through progressive exposure through the rolling shutter. Each line of the frame image is sequentially exposed, so when collecting each line of image information, the attitude information of the electronic device can be the same or different. For each line of image information, the corresponding attitude information is the exposure time of the line The attitude information collected by the attitude sensor in the segment.
103,通过驱动芯片获取姿态信息以及图像信息的同步信号。103. Obtain the attitude information and the synchronization signal of the image information through the driver chip.
驱动芯片分别与姿态传感器和图像传感器连接,图像传感器采集图像信息的同时可以生成同步信号,其中,同步信号可以为在采集图像信息时生成的提供时间参考的同步信号,例如,图像传感器通过逐行曝光的方式采集图像信息时可以生成帧同步信号和曝光行同步信号,在生成同步信号时,将同步信号发送至驱动芯片,姿态传感器在采集到姿态信息后将姿态信息发送至驱动芯片,驱动芯片接收姿态传感器发送姿态信息以及图像传感器发送的图像信息的同步信号。The driver chip is connected to the attitude sensor and the image sensor respectively, and the image sensor can generate a synchronization signal while collecting image information, wherein the synchronization signal can be a synchronization signal that provides a time reference generated when collecting the image information, for example, the image sensor passes line by line The frame synchronization signal and the exposure line synchronization signal can be generated when the exposure method collects image information. When the synchronization signal is generated, the synchronization signal is sent to the driver chip. After the attitude sensor collects the attitude information, it sends the attitude information to the driver chip. The driver chip The synchronization signal of attitude information sent by the attitude sensor and image information sent by the image sensor is received.
104,将姿态信息和图像信息的同步信号进行同步,得到同步后的姿态信息。104. Synchronize the attitude information and the synchronization signal of the image information to obtain synchronized attitude information.
本申请实施例提供的信息同步方法可以通过驱动芯片实现姿态信息的同步,通过硬件同步的方式,相较于通过时间戳的软件同步方式,可以提高姿态信息与图像信息同步的准确性。The information synchronization method provided by the embodiment of the present application can realize the synchronization of attitude information through the driver chip, and the accuracy of the synchronization of attitude information and image information can be improved through hardware synchronization, compared with software synchronization through time stamps.
本申请实施例还提供一种信息同步方法,请继续参阅图9,图9为本申请一实施例提供的信息同步方法的流程示意图,信息同步方法应用于电子设备,电子设备包括驱动芯片、图像传感器以及姿态传感器,信息同步方法包括:The embodiment of the present application also provides an information synchronization method. Please continue to refer to FIG. 9. FIG. 9 is a schematic flow diagram of the information synchronization method provided in an embodiment of the present application. Sensors and attitude sensors, information synchronization methods include:
201,通过姿态传感器采集姿态信息。201. Collect attitude information by using an attitude sensor.
其中,姿态传感器可以采集电子设备的姿态信息,姿态传感器可以包括霍尔传感器(Hall)、陀螺仪(Gyro)、加速度计(Acc)、磁力计(Magenatic)以及重力计(Gravity)中的一种或多种,姿态信息可以包括霍尔传感器(Hall)获取的霍尔值、陀螺仪(Gyro)获取的角速度值、加速度计(Acc)获取的加速度值、磁力计(Magenatic)获取的磁力值以及重力计(Gravity)获取的重力值等,当然还可以包括其他类型的姿态传感器,姿态信息可以反映电子设备的运动变化以及位置变化,姿态传感器可以在接收到采集信号后采集姿态信息,例如,在电子设备处于拍摄状态时,向姿态传感器发送采集信号,姿态传感器采集姿态信息。又例如在电子设备处于上电状态时姿态传感器实时采集姿态信息。Wherein, the attitude sensor can collect the attitude information of the electronic device, and the attitude sensor can include one of a Hall sensor (Hall), a gyroscope (Gyro), an accelerometer (Acc), a magnetometer (Magenatic) and a gravimeter (Gravity). Or more, attitude information can include the Hall value obtained by the Hall sensor (Hall), the angular velocity value obtained by the gyroscope (Gyro), the acceleration value obtained by the accelerometer (Acc), the magnetic force value obtained by the magnetometer (Magentic) and The gravity value obtained by the gravimeter (Gravity) can also include other types of attitude sensors, of course. The attitude information can reflect the movement and position changes of the electronic device. The attitude sensor can collect the attitude information after receiving the acquisition signal, for example, in When the electronic device is in the shooting state, it sends a collection signal to the attitude sensor, and the attitude sensor collects attitude information. Another example is that the attitude sensor collects attitude information in real time when the electronic device is in a power-on state.
202,通过图像传感器采集图像信息。202. Collect image information by using an image sensor.
图像传感器可以利用光电器件的光电转换功能将感光面上的光像转换为与光像成相应比例关系的电信号。图像传感器可以采集图像信息,例如,图像传感器可以通过逐行曝光的方式采集图像信息,通过卷帘快门通过逐行曝光的方式采集图像信息,对于采用逐行曝光的方式采集图像信息来说,每帧图像的每一行是依次曝光的,因此在采集每一行图像信息时,电子设备的姿态信息可以是相同也可以是不同的,对于每一行图像信息来说,对应的姿态信息为该行曝光时间段内姿态传感器采集到的姿态信息。The image sensor can use the photoelectric conversion function of the photoelectric device to convert the light image on the photosensitive surface into an electrical signal proportional to the light image. The image sensor can collect image information. For example, the image sensor can collect image information through progressive exposure, and collect image information through progressive exposure through the rolling shutter. Each line of the frame image is sequentially exposed, so when collecting each line of image information, the attitude information of the electronic device can be the same or different. For each line of image information, the corresponding attitude information is the exposure time of the line The attitude information collected by the attitude sensor in the segment.
203,通过驱动芯片获取姿态信息以及图像信息的同步信号,图像信息的同步信号包括帧同步信号和曝光行同步信号。203. Acquire posture information and a synchronization signal of image information through the drive chip, where the synchronization signal of image information includes a frame synchronization signal and an exposure line synchronization signal.
其中,由于图像传感器内部存在自主控制的图像帧的时序,帧同步信号可以是指垂直同步脉冲信号(Vertical synchronization,Vsync),图像传感器每获取一次图像帧数据,则生成一次帧同步信号,帧同步信号反映图像传感器当前曝光图像帧的帧号,曝光行同步信号可以是指水平同步脉冲信号(Horizontal synchronization,Hsync),图像传感器通过逐行曝光的方式采集图像信息,每曝光一行图像帧时,则生成一次曝光行同步信号,曝光行同步信号反映图像传感器当前曝光图像帧的行号。Wherein, since there is an autonomously controlled image frame timing inside the image sensor, the frame synchronization signal may refer to a vertical synchronization pulse signal (Vertical synchronization, Vsync). Every time the image sensor acquires image frame data, a frame synchronization signal is generated. The signal reflects the frame number of the currently exposed image frame of the image sensor. The exposure line synchronization signal may refer to a horizontal synchronization pulse signal (Horizontal synchronization, Hsync). The image sensor collects image information by means of line-by-line exposure. An exposure line synchronization signal is generated once, and the exposure line synchronization signal reflects the line number of the image sensor currently exposing the image frame.
当图像传感器开始逐行曝光采集图像信号时,每生成一次帧同步信号(Vsync)和曝光行同步信号(Hsync)时将帧同步信号和曝光行同步信号发送至驱动芯片。驱动芯片接收帧同步信号和曝光行同步信号。When the image sensor starts exposure and acquisition of image signals row by row, the frame sync signal (Vsync) and the exposure row sync signal (Hsync) are generated and sent to the driver chip each time. The driving chip receives the frame synchronous signal and the exposure line synchronous signal.
204,驱动芯片在获取到所述姿态信息时,根据帧同步信号以及曝光行同步信号对获取到的姿态信息进行赋值。204. When the driver chip acquires the attitude information, assign a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal.
例如,图像传感器当前曝光第一帧图像时生成反映帧号的帧同步信号,曝光至第一帧图像的第一行时将生成反映曝光行号的曝光行同步信号,将生成的帧同步信号和曝光行同步信号发送至驱动芯片,同时,驱动芯片接收姿态传感器发送的第一姿态信息,在驱动芯片接收到第一帧图像的帧同步信号以及曝光第一行图像数据生成的曝光行同步信号后,根据帧同步信号以及曝光行同步信号将第一帧图像的帧号以及第一行的行号赋值给第一姿态信息,建立帧号、行号以及第一姿态信息之间的映射关系,得到同步后的第一姿态信息,后续可以通过第一帧的帧号以及第一行的行号对齐到第一姿态信息。通过相同的方式曝光至第二行时获取到的姿态信息为第二姿态信息,将第一帧图像的帧号和第二行的行号赋值给第二姿态信息,建立帧号、行号以及第二姿态信息之间的映射关系,得到同步后的第二姿态信息,后续可以通过第一帧的帧号以及第二行的行号对齐到第二姿态信息。For example, when the image sensor is currently exposing the first frame image, it generates a frame synchronization signal reflecting the frame number. When it is exposed to the first line of the first frame image, it will generate an exposure line synchronization signal reflecting the exposure line number. The exposure row synchronization signal is sent to the driver chip, and at the same time, the driver chip receives the first posture information sent by the posture sensor. After the driver chip receives the frame synchronization signal of the first frame image and the exposure row synchronization signal generated by exposing the first row of image data , assign the frame number of the first frame image and the line number of the first line to the first attitude information according to the frame synchronization signal and the exposure line synchronization signal, establish the mapping relationship between the frame number, line number and the first attitude information, and obtain The synchronized first pose information can be subsequently aligned to the first pose information through the frame number of the first frame and the line number of the first line. The attitude information obtained when exposing to the second line in the same way is the second attitude information, assign the frame number of the first frame image and the line number of the second line to the second attitude information, and establish the frame number, line number and The mapping relationship between the second attitude information is to obtain the synchronized second attitude information, which can be subsequently aligned to the second attitude information through the frame number of the first frame and the line number of the second line.
在一些实施例中,由于采样频率的差异,逐行曝光速度较快,一个姿态信息可以对应多行曝光图像信息。In some embodiments, due to the difference in sampling frequency, the row-by-row exposure speed is faster, and one pose information may correspond to multiple rows of exposure image information.
可以理解的是帧号和行号可以为图像传感器内部赋值器或计数器在接收到相应的帧同步信号和行同步信号生成的数据标识。数据标识可以为具体的有规律的数值,也可以为其他无规律的数值。It can be understood that the frame number and row number may be data identifiers generated by an internal evaluator or counter of the image sensor upon receiving a corresponding frame synchronization signal and row synchronization signal. The data identifier can be a specific regular value or other irregular value.
在一些实施例中,根据帧同步信号以及曝光行同步信号对获取到的姿态信息进行赋值可以包括:In some embodiments, assigning the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal may include:
根据帧同步信号得到帧中断信号;Obtain a frame interruption signal according to the frame synchronization signal;
根据曝光行同步信号得到行中断信号;Obtain a line interruption signal according to the exposure line synchronization signal;
根据帧中断信号和所述行中断信号对获取到的姿态信息进行赋值。Assigning the acquired attitude information according to the frame interruption signal and the line interruption signal.
其中,驱动芯片的GPIO接口接收到图像传感器发送帧同步信号时,生成对应的帧中断信号,GPIO接口接收到图像传感器发送的行同步信号时,生成对应的行中断信号,根据行中断信号和帧中断信号对从姿态传感器获取到的姿态信息进行赋值,例如,驱动芯片曝光第一帧图像的第一行时,向驱动芯片发送帧同步信号以及曝光行同步信号,驱动芯片的GPIO接口接收到帧同步信号后生成第一帧图像对应的帧中断信号,驱动芯片的GPIO接收到曝光行同步信号后生成第一帧图像第一行对应的行中断信号,根据帧中断信号以及行中断信号对从姿态传感器获取到的第一姿态信息进行赋值,帧中断信号和行中断信号可以反映对应的帧号和行号,以建立帧号、行号以及第一姿态信息之间的映射关系,得到同步后的姿态信息,后续可以通过第一帧图像信息的帧号以及第一行的行号对齐到第一姿态信息。又例如,驱动芯片曝光第一帧图像的第二行时,向驱动芯片发送帧同步信号以及曝光行同步信号,驱动芯片的GPIO接口接收到帧同步信号后生成第一帧图像对应的帧中断信号,驱动芯片的GPIO接口接收到曝光行同步信号后生成第一帧图像第二行对应的行中断信号,根据帧中断信号以及行中断信号对从姿态传感器获取到的第二姿态信息进行赋值,帧中断信号和行中断信号可以反映对应的帧号和行号,以建立帧号、行号以及第二姿态信息之间的映射关系,得到同步后的姿态信息,后续可以通过第一帧图像信息的帧号以及第二行的行号对齐到第二姿态信息。Among them, when the GPIO interface of the driver chip receives the frame synchronization signal sent by the image sensor, it generates a corresponding frame interruption signal. When the GPIO interface receives the line synchronization signal sent by the image sensor, it generates a corresponding line interruption signal. The interrupt signal assigns a value to the attitude information obtained from the attitude sensor. For example, when the driver chip exposes the first line of the first frame image, it sends a frame synchronization signal and an exposure row synchronization signal to the driver chip, and the GPIO interface of the driver chip receives the frame After the synchronization signal, the frame interrupt signal corresponding to the first frame image is generated, and the GPIO of the driver chip generates the row interrupt signal corresponding to the first line of the first frame image after receiving the exposure line sync signal, and the slave attitude is determined according to the frame interrupt signal and the row interrupt signal. The first attitude information acquired by the sensor is assigned, and the frame interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the first attitude information, and obtain the synchronized The attitude information can be subsequently aligned to the first attitude information through the frame number of the first frame of image information and the line number of the first line. For another example, when the driver chip exposes the second line of the first frame image, it sends a frame synchronization signal and an exposure row synchronization signal to the driver chip, and the GPIO interface of the driver chip generates a frame interrupt signal corresponding to the first frame image after receiving the frame synchronization signal , the GPIO interface of the driver chip receives the exposure line synchronization signal and generates the line interruption signal corresponding to the second line of the first frame image, and assigns the second attitude information obtained from the attitude sensor according to the frame interruption signal and the line interruption signal. The interrupt signal and line interrupt signal can reflect the corresponding frame number and line number, so as to establish the mapping relationship between the frame number, line number and the second attitude information, and obtain the synchronized attitude information, which can be followed by the first frame of image information. The frame number and the row number of the second row are aligned to the second pose information.
在一些实施例中,由于采样频率的差异,逐行曝光速度较快,一个姿态信息可以对应多行曝光图像信息,例如,在驱动芯片接收从姿态传感器发送的第三姿态信息时,驱动芯片从图像传感器获取到了表示曝光第一帧图像的帧中断信号以及曝光第二十至第三十行的行中断信号,建立第三姿态数据、帧号以及曝光行号的映射关系。接收从姿态传感器发送的第四姿态信息时,驱动芯片接收到了表示曝光第一帧图像的第三十一行至四十行的行中断信号,却没有接收到表示曝光第二帧图像的帧中断信号,建立第四姿态数据、帧号以及曝光行号的映射关系。可以理解的是,帧号和行号可以为驱动芯片内部计数器在接收到帧中断信号和行中断信号后生成的数据标识。数据标识可以为具体的有规律的数值,也可以为其他无规律的数值。需要说明的是,上述同步方式仅仅是示例性的,驱动芯片还可以通过其他硬件同步方式实现姿态信息的同步。In some embodiments, due to the difference in sampling frequency, the row-by-row exposure speed is faster, and one attitude information can correspond to multiple rows of exposure image information. For example, when the driver chip receives the third attitude information sent from the attitude sensor, the driver chip from The image sensor acquires the frame interruption signal representing the exposure of the first frame of image and the line interruption signal of exposing the 20th to 30th lines, and establishes the mapping relationship between the third posture data, the frame number and the exposure line number. When receiving the fourth attitude information sent from the attitude sensor, the driver chip received the line interrupt signal indicating the exposure of the first frame image from the 31st line to the forty line, but did not receive the frame interruption signal indicating the exposure of the second frame image signal to establish a mapping relationship between the fourth pose data, frame number and exposure line number. It can be understood that the frame number and the row number may be data identifiers generated by the internal counter of the driver chip after receiving the frame interrupt signal and the row interrupt signal. The data identifier can be a specific regular value or other irregular value. It should be noted that the above synchronization method is only exemplary, and the driver chip can also realize the synchronization of attitude information through other hardware synchronization methods.
在一些实施例中,驱动芯片包括缓冲存储器和寄存器,通过所述驱动芯片获取所述姿态信息以及图像信息的同步信号包括:In some embodiments, the driver chip includes a buffer memory and a register, and obtaining the synchronization signal of the posture information and the image information through the driver chip includes:
通过寄存器获取姿态信息;Obtain attitude information through registers;
通过缓冲存储器获取图像信息的同步信号;Acquiring the synchronous signal of the image information through the buffer memory;
寄存器在获取到姿态信息时将姿态信息缓冲至缓冲存储器;The register buffers the attitude information to the buffer memory when the attitude information is acquired;
在缓冲存储器缓冲到姿态信息时,将接收到的图像信息的同步信号与缓冲到的姿态信息同步。When the attitude information is buffered in the buffer memory, the synchronization signal of the received image information is synchronized with the buffered attitude information.
其中,将接收到的图像信息的同步信号与缓冲到的姿态信息同步可以通过所述的同步方式实现。Wherein, synchronizing the synchronization signal of the received image information with the buffered posture information can be realized through the above synchronization method.
206,将同步后的姿态信息发送至所述图像传感器。206. Send the synchronized attitude information to the image sensor.
207,图像传感器将同步后的姿态信息发送至所述应用处理器。207. The image sensor sends the synchronized attitude information to the application processor.
208,应用处理器根据同步后的姿态信息实现电子防抖和/或光学防抖。208. The application processor implements electronic image stabilization and/or optical image stabilization according to the synchronized attitude information.
关于步骤206~208:Regarding steps 206-208:
图像传感器和驱动芯片可以通过SPI接口连接,驱动芯片用于通过SPI接口将同步后的姿态信息发送至图像传感器,以使图像传感器将图像帧数据与同步后的姿态信息打包形成同步后的信息,图像传感器将同步后的信息发送至应用处理器,其中,图像传感器可以通过移动产业处理器接口(MIPI接口)与应用处理器连接。通过图像处理器接收同步后的姿态信息再与图像帧数据打包发送至应用处理器,不但可以提高姿态信息和图像帧数据时间上的同步的准确性,还可以在整个系统上实现不同数据流的同源获取,进而可以在一个线程中将两种数据进行整合,可以避免通过异步线程获取不同的数据之间的存在的时间差的同步等待处理,降低系统复杂度,提高系统的稳定性。The image sensor and the driver chip can be connected through the SPI interface, and the driver chip is used to send the synchronized attitude information to the image sensor through the SPI interface, so that the image sensor packages the image frame data and the synchronized attitude information to form synchronized information, The image sensor sends the synchronized information to the application processor, where the image sensor can be connected to the application processor through a mobile industry processor interface (MIPI interface). Receive the synchronized attitude information through the image processor and then package it with the image frame data and send it to the application processor, which can not only improve the accuracy of the time synchronization between the attitude information and the image frame data, but also realize the synchronization of different data streams in the whole system Obtaining from the same source can then integrate two kinds of data in one thread, which can avoid synchronous waiting for processing due to the time difference between obtaining different data through asynchronous threads, reduce system complexity, and improve system stability.
应用处理器接收到打包后的数据后进行拆分,将图像帧数据发送至图像处理器,图像处理器可以根据算法以及同步后的姿态信息对采集到的图像信息实现电子防抖,例如根据同步后的姿态信息对图像帧数据进行姿态估计、姿态滤波以及图像扭转等处理,以实现电子防抖,应用处理器还可以根据同步后的姿态信息对驱动芯片进行反馈调节,例如,应用处理器根据同步后的姿态信息获取镜头和/或图像传感器的复位信息,将复位信息发送至驱动芯片,驱动芯片根据复位信息对光学防抖后的镜头和/或图像传感器进行复位,以完成光学防抖。The application processor splits the packaged data after receiving it, and sends the image frame data to the image processor. The image processor can implement electronic anti-shake for the collected image information according to the algorithm and the synchronized attitude information, for example, according to the synchronization The post-posture information performs pose estimation, pose filtering, and image torsion processing on the image frame data to achieve electronic anti-shake. The application processor can also perform feedback adjustment to the driver chip according to the synchronized pose information. The synchronized attitude information obtains the reset information of the lens and/or image sensor, and sends the reset information to the driver chip, and the driver chip resets the optically stabilized lens and/or image sensor according to the reset information to complete the optical image stabilizer.
在电子设备实现光学防抖的场景中,电子设备还包括驱动马达和镜头,信息同步方法还包括:In the scenario where an electronic device implements optical image stabilization, the electronic device also includes a drive motor and a lens, and the information synchronization method also includes:
通过驱动芯片根据获取到的姿态信息计算得到第一补偿数据,通过驱动马达根据所述第一补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖;或calculating the first compensation data according to the acquired posture information by driving the chip, and driving the lens and/or the image sensor to move according to the first compensation data by the driving motor to achieve optical anti-shake; or
通过驱动芯片接收第二补偿数据,通过驱动马达根据第二补偿数据驱动镜头和/或图像传感器运动以实现光学防抖。The second compensation data is received by the driving chip, and the lens and/or the image sensor are driven to move by the driving motor according to the second compensation data to realize optical anti-shake.
其中,驱动芯片可以集成有光学防抖算法,在接收到姿态信息后根据光学防抖算法计算得到第一补偿数据,驱动芯片将第一补偿数据发送至驱动马达,使能驱动马达驱动镜头和/或图像传感器运动,驱动芯片实现光学防抖的逻辑可以如下:Wherein, the driver chip can be integrated with an optical anti-shake algorithm. After receiving the attitude information, the first compensation data is calculated according to the optical anti-shake algorithm. The driver chip sends the first compensation data to the drive motor, enabling the drive motor to drive the lens and/or Or image sensor movement, the logic of driving the chip to achieve optical image stabilization can be as follows:
驱动芯片读取姿态传感器(Gyro、Acc、Mag和/或Gravity)的姿态信息后,对读取到的姿态信息进行滤波操作,得到滤波后的姿态信息,将滤波后的姿态信息进行积分和增益操作,用于计算出电子设备的抖动量,驱动芯片通过霍尔传感器(Hall)获取当前镜头和/或图像传感器的位置信息,获取的是镜头位置信息还是图像传感器的位置信息,还是镜头位置信息和图像传感器的位置,与霍尔传感器的数量以及位置有关。驱动芯片根据电子设备的抖动量以及镜头和/或图像传感器当前的位置信息计算得到镜头和/或图像传感器的光学补偿数据(如第一补偿数据),根据光学补偿数据向驱动马达发送驱动信号,来使能驱动马达驱动镜头和/或图像传感器运动以移动到目标位置,以实现光学防抖。其中,通过驱动芯片实现光学防抖是一个实时高频的反馈控制过程,可以通过PID(Proportion Integral Differential)控制来使驱动马达稳定的驱动镜头和/或图像传感器到目标位置。After the driver chip reads the attitude information of the attitude sensor (Gyro, Acc, Mag and/or Gravity), it performs a filtering operation on the read attitude information to obtain the filtered attitude information, and integrates and gains the filtered attitude information Operation, used to calculate the amount of shaking of the electronic device, the driver chip obtains the position information of the current lens and/or image sensor through the Hall sensor (Hall), whether it is the position information of the lens or the position information of the image sensor, or the position information of the lens And the position of the image sensor is related to the number and position of the Hall sensor. The drive chip calculates the optical compensation data (such as the first compensation data) of the lens and/or image sensor according to the shaking amount of the electronic device and the current position information of the lens and/or image sensor, and sends a drive signal to the drive motor according to the optical compensation data, To enable the drive motor to drive the lens and/or the image sensor to move to a target position to achieve optical image stabilization. Among them, the realization of optical image stabilization through the drive chip is a real-time high-frequency feedback control process, and the drive motor can stably drive the lens and/or image sensor to the target position through PID (Proportion Integral Differential) control.
又或者,还可以将一些实现光学防抖算法集成在应用处理器,应用处理器可以获取姿态传感器的姿态信息,根据姿态信息以及光学防抖算法计算得到光学补偿数据(如第二补偿数据),应用处理器将第二补偿数据发送至驱动芯片,驱动芯片根据光学补偿数据向驱动马达发送驱动信号,来使能驱动马达驱动镜头和/或图像传感器运动以移动到目标位置,以实现光学防抖,涉及到光学防抖的算法均可以在应用处理器中执行,可以减少驱动芯片的数据处理量。Or, it is also possible to integrate some optical anti-shake algorithms into the application processor, and the application processor can obtain the attitude information of the attitude sensor, and calculate the optical compensation data (such as the second compensation data) according to the attitude information and the optical anti-shake algorithm, The application processor sends the second compensation data to the driver chip, and the driver chip sends a drive signal to the drive motor according to the optical compensation data, so as to enable the drive motor to drive the lens and/or the image sensor to move to the target position, so as to achieve optical anti-shake , the algorithms related to optical image stabilization can be executed in the application processor, which can reduce the data processing amount of the driver chip.
相关的光学防抖技术中,驱动芯片只需要根据电子设备当前的抖动情况持续实时调整镜头和/或图像传感器的位置,然而,影响图像成像效果的因素只是图像传感器在曝光的那个时间电子设备的抖动,对于其他非曝光时间内的抖动由于图像传感器没有成像,因此没有影响。相关光学防抖技术中需要持续地对镜头和/或图像传感器进行调整,造成电子设备不必要的开销。In the related optical anti-shake technology, the driver chip only needs to continuously adjust the position of the lens and/or image sensor in real time according to the current shaking situation of the electronic device. However, the factors that affect the imaging effect of the image are only the time when the image sensor is exposed. Jitter, for the jitter in other non-exposure time, since the image sensor has no imaging, it has no effect. The relevant optical image stabilization technology needs to continuously adjust the lens and/or the image sensor, resulting in unnecessary overhead for electronic equipment.
基于此,为了减少电子设备不必要的开销,降低电子设备的功耗,驱动芯片可以通过将姿态信息和采集图像信息的同步信号进行同步,根据同步后的姿态信息动态控制驱动马达,从而避免在图像传感器非曝光时间的开销,降低电子设备的功耗。例如,驱动芯片从图像信息的同步信号中确定出目标信号;根据目标信号控制驱动马达停止驱动所述镜头和/或所述图像传感器运动。具体的,驱动芯片在接收到每帧最后一行的行同步信号(目标信号)停止曝光时关闭驱动芯片对于驱动马达的控制功能,在接收到每帧第一行开始曝光的行同步信号时开启驱动芯片对于驱动马达的控制功能,可以使驱动芯片只在帧图像曝光时序时才进行工作,从而可以降低整体系统的功耗。Based on this, in order to reduce the unnecessary overhead of electronic equipment and reduce the power consumption of electronic equipment, the driver chip can synchronize the attitude information with the synchronization signal of the collected image information, and dynamically control the drive motor according to the synchronized attitude information, thereby avoiding Overhead of image sensor non-exposure time, reducing power consumption of electronic devices. For example, the driving chip determines the target signal from the synchronous signal of the image information; according to the target signal, the driving motor is controlled to stop driving the lens and/or the image sensor to move. Specifically, when the driver chip receives the horizontal synchronous signal (target signal) of the last row of each frame to stop the exposure, it turns off the control function of the driver chip for the drive motor, and when it receives the horizontal synchronous signal of the first row of each frame to start exposure, it turns on the drive chip. The chip's control function for the drive motor can make the drive chip work only when the frame image is exposed, thereby reducing the power consumption of the overall system.
本申请一实施例提供的信息同步方法,对于光学防抖的应用来说,可以根据图像信息的同步信号在图像传感器曝光时控制驱动马达驱动镜头和/或图像传感器运动,实现光学防抖,在图像传感器处于非曝光时间段,停止驱动镜头和/或图像传感器运动,可以降低实现光学防抖时系统的功耗。对于实现电子防抖的应用来说,通过驱动芯片根据图像信息的同步信号以及获取的姿态信息实现姿态信息的同步,通过硬件的同步方式,相较于通过时间戳将图像信息和姿态信息同步会造成误差的软件同步的方式,可以提高姿态信息与图像信息同步的准确性。进而提高电子防抖根据同步后的姿态信息处理图像帧数据的准确性。对于光学防抖+电子防抖(即在具备光学防抖功能的模组上进行电子防抖的进一步防抖处理)的应用来说,不但可以降低光学防抖模组的功耗,还可以提高电子防抖数据处理的准确。The information synchronization method provided by an embodiment of the present application, for the application of optical anti-shake, can control the drive motor to drive the lens and/or the movement of the image sensor according to the synchronization signal of the image information when the image sensor is exposed, so as to realize the optical anti-shake. The image sensor is in the non-exposure time period, and the driving lens and/or the movement of the image sensor is stopped, which can reduce the power consumption of the system when optical image stabilization is implemented. For the application of electronic anti-shake, the synchronization of the attitude information is realized through the driver chip according to the synchronization signal of the image information and the acquired attitude information. Compared with the synchronization of the image information and the attitude information through the time stamp, the synchronization method of the hardware will The way of software synchronization that causes errors can improve the accuracy of synchronization between attitude information and image information. Further, the accuracy of electronic anti-shake processing image frame data according to the synchronized posture information is improved. For the application of optical anti-shake + electronic anti-shake (that is, further anti-shake processing of electronic anti-shake on the module with optical anti-shake function), it can not only reduce the power consumption of the optical anti-shake module, but also improve Electronic anti-shake data processing is accurate.
请继续参阅图10,图10为本申请一实施例提供的电子设备的结构框图,本申请提供的电子设备还可以包括:显示屏140、射频电路150、音频电路160、输入单元170以及电源180。本领域技术人员可以理解,图10中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please continue to refer to FIG. 10. FIG. 10 is a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device provided by the present application may also include: a display screen 140, a radio frequency circuit 150, an audio circuit 160, an input unit 170, and a power supply 180 . Those skilled in the art can understand that the structure of the computer device shown in FIG. 10 does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
显示屏140可用于显示图形用户界面以及接收用户作用于图形用户界面产生的操作指令。显示屏140可以包括显示面板和触控面板。其中,显示面板可用于显示由用户输入的信息或提供给用户的信息以及计算机设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic  Light-Emitting Diode)等形式来配置显示面板。触控面板可用于收集用户在其上或附近的触摸操作,并生成相应的操作指令,且操作指令执行对应程序。The display screen 140 can be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The display screen 140 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by or provided to the user and various graphical user interfaces of the computer equipment. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. The touch panel can be used to collect user's touch operations on or near it, and generate corresponding operation instructions, and the operation instructions execute corresponding programs.
射频电路150可用于收发射频信号,以通过无线通信与网络设备或其他计算机设备建立无线通讯,与网络设备或其他计算机设备之间收发信号。The radio frequency circuit 150 can be used to send and receive radio frequency signals to establish wireless communication with network equipment or other computer equipment through wireless communication, and to send and receive signals with network equipment or other computer equipment.
音频电路160可以用于通过扬声器、传声器提供用户与计算机设备之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理后,经射频电路150以发送给比如另一计算机设备。音频电路160还可能包括耳塞插孔,以提供外设耳机与计算机设备的通信。The audio circuit 160 may be used to provide an audio interface between the user and the computer device through speakers, microphones. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted by the audio circuit 160 After the audio data is output and processed, the audio data is sent to another computer device through the radio frequency circuit 150 . Audio circuitry 160 may also include an earphone jack to provide communication of peripheral headphones with the computer device.
输入单元170可用于接收输入的数字、字符信息或用户特征信息(例如指纹、虹膜、面部信息等),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The input unit 170 can be used to receive input numbers, character information or user characteristic information (such as fingerprints, irises, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control .
电源180用于给计算机设备400的各个部件供电。可选的,电源180可以通过电源管理系统与各个电子元件逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源180还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The power supply 180 is used to supply power to various components of the computer device 400 . Optionally, the power supply 180 may be logically connected to various electronic components through a power management system, so as to implement functions such as management of charging, discharging, and power consumption through the power management system. The power supply 180 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
尽管图10中未示出,计算机设备400还可以包括传感器、无线保真模块、蓝牙模块等,在此不再赘述。Although not shown in FIG. 10 , the computer device 400 may also include a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
本申请实施例还提供一种计算机可读的存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种信息同步方法中的步骤。The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any one of the information synchronization methods provided in the embodiments of the present application.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
由于该计算机可读的存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种信息同步方法中的步骤,因此,可以实现本申请实施例所提供的任一种信息同步方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Because the computer program stored in the computer-readable storage medium can execute the steps in any information synchronization method provided by the embodiment of the application, therefore, any information synchronization provided by the embodiment of the application can be realized For the beneficial effects that can be achieved by the method, refer to the previous embodiments for details, and will not be repeated here.
以上对本申请实施例提供的信息同步方法、电子设备及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请。同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The information synchronization method, electronic device, and computer-readable storage medium provided in the embodiments of the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application, and the descriptions of the above embodiments are only used to help understand the present application. At the same time, for those skilled in the art, based on the idea of this application, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as limiting the application.

Claims (20)

  1. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device includes:
    姿态传感器,用于采集姿态信息;Attitude sensor for collecting attitude information;
    图像传感器,用于采集图像信息;An image sensor for collecting image information;
    驱动芯片,分别与所述姿态传感器和所述图像传感器连接,所述驱动芯片用于获取所述姿态信息以及所述图像信息的同步信号,并将所述姿态信息和所述图像信息的同步信号进行同步,以得到同步后的姿态信息。A driver chip, connected to the attitude sensor and the image sensor respectively, the driver chip is used to obtain the attitude information and the synchronization signal of the image information, and transfer the attitude information and the synchronization signal of the image information Synchronize to obtain the synchronized attitude information.
  2. 根据权利要求1所述的电子设备,其中,所述驱动芯片包括缓冲存储器和寄存器,所述寄存器与所述姿态传感器连接,所述寄存器用于寄存从所述姿态传感器获取的姿态信息,所述缓冲存储器分别与所述寄存器和所述图像传感器连接,所述缓冲存储器用于从所述寄存器获取所述姿态信息以及从所述图像传感器获取所述图像信息的同步信号,以将获取到的所述姿态信息和所述图像信息的同步信号进行同步。The electronic device according to claim 1, wherein the driver chip includes a buffer memory and a register, the register is connected to the attitude sensor, the register is used to register the attitude information obtained from the attitude sensor, the The buffer memory is respectively connected with the register and the image sensor, and the buffer memory is used to obtain the attitude information from the register and the synchronization signal of the image information from the image sensor, so as to transfer the acquired The gesture information and the synchronization signal of the image information are synchronized.
  3. 根据权利要求2所述的电子设备,其中,所述缓冲存储器通过GPIO接口与所述图像传感器连接,用于获取所述图像信息的同步信号。The electronic device according to claim 2, wherein the buffer memory is connected to the image sensor through a GPIO interface, and is used to obtain a synchronization signal of the image information.
  4. 根据权利要求3所述的电子设备,其中,所述缓冲存储器还通过第一SPI接口与所述图像传感器连接,用于将所述同步后的姿态信息发送至所述图像传感器。The electronic device according to claim 3, wherein the buffer memory is further connected to the image sensor through a first SPI interface, for sending the synchronized attitude information to the image sensor.
  5. 根据权利要求2所述的电子设备,其中,所述寄存器通过第二SPI接口与所述姿态传感器连接,用于获取所述姿态信息。The electronic device according to claim 2, wherein the register is connected to the attitude sensor through a second SPI interface for obtaining the attitude information.
  6. 根据权利要求1所述的电子设备,其中,所述图像信息的同步信号包括帧同步信号和曝光行同步信号,所述图像传感器用于将所述帧同步信号和曝光行同步信号发送至所述驱动芯片,所述驱动芯片用于在获取到所述姿态信息时,根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值。The electronic device according to claim 1, wherein the synchronous signal of the image information includes a frame synchronous signal and an exposure line synchronous signal, and the image sensor is used to send the frame synchronous signal and the exposure line synchronous signal to the A driving chip, where the driving chip is configured to assign a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal when the attitude information is acquired.
  7. 根据权利要求6所述的电子设备,其中,所述驱动芯片用于根据所述帧同步信号得到帧中断信号,根据所述曝光行同步信号得到行中断信号,根据所述帧中断信号和所述行中断信号对获取到的姿态信息赋值。The electronic device according to claim 6, wherein the driver chip is used to obtain a frame interruption signal according to the frame synchronization signal, obtain a line interruption signal according to the exposure line synchronization signal, and obtain a line interruption signal according to the frame interruption signal and the The line interrupt signal assigns a value to the acquired attitude information.
  8. 根据权利要求1-7任一项所述的电子设备,其中,所述电子设备还包括驱动马达和镜头,所述驱动芯片与所述驱动马达连接;The electronic device according to any one of claims 1-7, wherein the electronic device further comprises a driving motor and a lens, and the driving chip is connected to the driving motor;
    所述驱动芯片还用于根据获取的姿态信息计算得到第一补偿数据,所述驱动马达用于根据所述第一补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The drive chip is also used to calculate first compensation data according to the acquired posture information, and the drive motor is used to drive the lens and/or the image sensor to move according to the first compensation data to achieve optical anti-shake.
  9. 根据权利要求1-7任一项所述的电子设备,其中,所述电子设备还包括驱动马达和镜头,所述驱动芯片与所述驱动马达连接;The electronic device according to any one of claims 1-7, wherein the electronic device further comprises a driving motor and a lens, and the driving chip is connected to the driving motor;
    所述驱动芯片还用于接收第二补偿数据,所述驱动马达用于根据所述第二补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The driving chip is further used to receive second compensation data, and the driving motor is used to drive the lens and/or the image sensor to move according to the second compensation data to achieve optical anti-shake.
  10. 根据权利要求1-7任一项所述的电子设备,其中,所述电子设备还包括驱动马达,所述驱动芯片与所述驱动马达连接,所述驱动芯片还用于从所述图像信息的同步信号中确定出目标信号,所述驱动芯片根据所述目标信号关闭所述驱动马达的控制功能。The electronic device according to any one of claims 1-7, wherein the electronic device further comprises a driving motor, the driving chip is connected to the driving motor, and the driving chip is also used to obtain the information from the image information A target signal is determined from the synchronous signal, and the drive chip turns off the control function of the drive motor according to the target signal.
  11. 根据权利要求1-7任一项所述的电子设备,其中,所述电子设备还包括应用处理器,所述应用处理器用于获取所述同步后的姿态信息,以根据所述同步后的姿态信息实现电子防抖和/或光学防抖。The electronic device according to any one of claims 1-7, wherein the electronic device further comprises an application processor, the application processor is configured to obtain the synchronized posture information, and to The information implements electronic anti-shake and/or optical anti-shake.
  12. 根据权利要求1-7任一项所述的电子设备,其中,所述姿态传感器包括加速度计、霍尔传感器、陀螺仪、磁力计以及重力计中的一种或多种。The electronic device according to any one of claims 1-7, wherein the attitude sensor comprises one or more of an accelerometer, a Hall sensor, a gyroscope, a magnetometer and a gravimeter.
  13. 一种信息同步方法,其中,应用于电子设备,所述电子设备包括驱动芯片、图像传感器以及姿态传感器,所述信息同步方法包括:An information synchronization method, which is applied to an electronic device, the electronic device includes a driver chip, an image sensor, and an attitude sensor, and the information synchronization method includes:
    通过所述姿态传感器采集姿态信息;collecting attitude information through the attitude sensor;
    通过图像传感器采集图像信息;Collect image information through the image sensor;
    通过所述驱动芯片获取所述姿态信息以及所述图像信息的同步信号;Obtaining the attitude information and the synchronization signal of the image information through the driving chip;
    将所述姿态信息和所述图像信息的同步信号进行同步,得到同步后的姿态信息。Synchronizing the posture information and the synchronization signal of the image information to obtain synchronized posture information.
  14. 根据权利要求13所述的信息同步方法,其中,所述驱动芯片包括缓冲存储器和寄存器,所述通过所述驱动芯片获取所述姿态信息以及所述图像信息的同步信号包括:The information synchronization method according to claim 13, wherein the driver chip includes a buffer memory and a register, and the acquisition of the synchronization signal of the posture information and the image information by the driver chip includes:
    通过所述寄存器获取所述姿态信息;Obtaining the attitude information through the register;
    通过所述缓冲存储器获取所述图像信息的同步信号;acquiring a synchronization signal of the image information through the buffer memory;
    所述寄存器在获取到所述姿态信息时将所述姿态信息缓冲至所述缓冲存储器;The register buffers the attitude information to the buffer memory when the attitude information is acquired;
    在所述缓冲存储器缓冲到所述姿态信息时,将接收到的所述图像信息的同步信号与缓冲到的姿态信息同步。When the buffer memory buffers the posture information, the received synchronization signal of the image information is synchronized with the buffered posture information.
  15. 根据权利要求13所述的信息同步方法,其中,所述图像信息的同步信号包括帧同步信号和曝光行同步信号,所述将所述姿态信息和所述图像信息的同步信号进行同步包括:The information synchronization method according to claim 13, wherein the synchronization signal of the image information includes a frame synchronization signal and an exposure line synchronization signal, and the synchronization of the posture information and the synchronization signal of the image information includes:
    所述驱动芯片在获取到所述姿态信息时,根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值。When the drive chip acquires the attitude information, it assigns a value to the acquired attitude information according to the frame synchronization signal and the exposure line synchronization signal.
  16. 根据权利要求15所述的信息同步方法,其中,所述根据所述帧同步信号以及所述曝光行同步信号对获取到的姿态信息进行赋值包括:The information synchronization method according to claim 15, wherein said assigning the acquired posture information according to the frame synchronization signal and the exposure row synchronization signal comprises:
    根据所述帧同步信号得到帧中断信号;obtaining a frame interruption signal according to the frame synchronization signal;
    根据所述曝光行同步信号得到行中断信号;Obtaining a line interruption signal according to the exposure line synchronization signal;
    根据所述帧中断信号和所述行中断信号对获取到的姿态信息进行赋值。Assigning the acquired attitude information according to the frame interruption signal and the line interruption signal.
  17. 根据权利要求13至16任一项所述的信息同步方法,其中,所述电子设备还包括驱动马达和镜头,所述信息同步方法还包括:The information synchronization method according to any one of claims 13 to 16, wherein the electronic device further includes a drive motor and a lens, and the information synchronization method further includes:
    通过所述驱动芯片根据获取到的姿态信息计算得到第一补偿数据,通过所述驱动马达根据所述第一补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖;或Using the drive chip to calculate first compensation data according to the acquired attitude information, and using the drive motor to drive the lens and/or the image sensor to move according to the first compensation data to achieve optical anti-shake; or
    通过所述驱动芯片接收第二补偿数据,通过所述驱动马达根据所述第二补偿数据驱动所述镜头和/或所述图像传感器运动以实现光学防抖。The second compensation data is received by the drive chip, and the lens and/or the image sensor are driven to move by the drive motor according to the second compensation data to achieve optical anti-shake.
  18. 根据权利要求17所述的信息同步方法,其中,所述方法还包括:The information synchronization method according to claim 17, wherein the method further comprises:
    所述驱动芯片从所述图像信息的同步信号中确定出目标信号;The drive chip determines the target signal from the synchronization signal of the image information;
    根据所述目标信号控制所述驱动马达停止驱动所述镜头和/或所述图像传感器。The driving motor is controlled to stop driving the lens and/or the image sensor according to the target signal.
  19. 根据权利要求13至16任一项所述的信息同步方法,其中,所述电子设备还包括应用处理器,在所述得到同步后的姿态信息之后,所述信息同步方法还包括:The information synchronization method according to any one of claims 13 to 16, wherein the electronic device further includes an application processor, and after obtaining the synchronized posture information, the information synchronization method further includes:
    将所述同步后的姿态信息发送至所述图像传感器;sending the synchronized attitude information to the image sensor;
    所述图像传感器将所述同步后的姿态信息发送至所述应用处理器;The image sensor sends the synchronized attitude information to the application processor;
    所述应用处理器根据所述同步后的姿态信息实现电子防抖和/或光学防抖。The application processor implements electronic anti-shake and/or optical anti-shake according to the synchronized attitude information.
  20. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求13至19任一项所述的信息同步方法的步骤。A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the steps of the information synchronization method according to any one of claims 13 to 19 are realized.
PCT/CN2022/096942 2021-07-29 2022-06-02 Electronic device, information synchronization method, and computer readable storage medium WO2023005424A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110866304.6 2021-07-29
CN202110866304.6A CN113489880A (en) 2021-07-29 2021-07-29 Electronic device, information synchronization method, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2023005424A1 true WO2023005424A1 (en) 2023-02-02

Family

ID=77944499

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096942 WO2023005424A1 (en) 2021-07-29 2022-06-02 Electronic device, information synchronization method, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN113489880A (en)
WO (1) WO2023005424A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113489880A (en) * 2021-07-29 2021-10-08 Oppo广东移动通信有限公司 Electronic device, information synchronization method, and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108353131A (en) * 2016-10-17 2018-07-31 华为技术有限公司 Obtain the method and terminal device of image
CN109951639A (en) * 2019-03-26 2019-06-28 Oppo广东移动通信有限公司 Camera stabilization system, method, electronic equipment and computer readable storage medium
CN110622500A (en) * 2017-05-18 2019-12-27 索尼公司 Image forming apparatus and image forming method
CN110858873A (en) * 2018-08-23 2020-03-03 北京小米移动软件有限公司 Electronic device and photographing method
CN111246088A (en) * 2020-01-13 2020-06-05 Oppo广东移动通信有限公司 Anti-shake method, electronic device, and computer-readable storage medium
CN111432112A (en) * 2019-01-10 2020-07-17 爱思开海力士有限公司 Method of processing image signal, image signal processor, and image sensor chip
CN113489880A (en) * 2021-07-29 2021-10-08 Oppo广东移动通信有限公司 Electronic device, information synchronization method, and computer-readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150185054A1 (en) * 2013-12-30 2015-07-02 Motorola Mobility Llc Methods and Systems for Synchronizing Data Received from Multiple Sensors of a Device
CN107231533B (en) * 2017-06-12 2019-12-13 深圳市瑞立视多媒体科技有限公司 synchronous exposure method and device and terminal equipment
CN208836277U (en) * 2018-12-03 2019-05-07 重庆哆来目科技有限公司 A kind of FPD-LINK III camera of the accurate stabilization function of band
CN109922260B (en) * 2019-03-04 2020-08-21 中国科学院上海微系统与信息技术研究所 Data synchronization method and synchronization device for image sensor and inertial sensor
CN109951638B (en) * 2019-03-26 2021-02-02 Oppo广东移动通信有限公司 Camera anti-shake system, camera anti-shake method, electronic device, and computer-readable storage medium
CN110430365B (en) * 2019-08-26 2021-10-01 Oppo广东移动通信有限公司 Anti-shake method, anti-shake device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108353131A (en) * 2016-10-17 2018-07-31 华为技术有限公司 Obtain the method and terminal device of image
CN110622500A (en) * 2017-05-18 2019-12-27 索尼公司 Image forming apparatus and image forming method
CN110858873A (en) * 2018-08-23 2020-03-03 北京小米移动软件有限公司 Electronic device and photographing method
CN111432112A (en) * 2019-01-10 2020-07-17 爱思开海力士有限公司 Method of processing image signal, image signal processor, and image sensor chip
CN109951639A (en) * 2019-03-26 2019-06-28 Oppo广东移动通信有限公司 Camera stabilization system, method, electronic equipment and computer readable storage medium
CN111246088A (en) * 2020-01-13 2020-06-05 Oppo广东移动通信有限公司 Anti-shake method, electronic device, and computer-readable storage medium
CN113489880A (en) * 2021-07-29 2021-10-08 Oppo广东移动通信有限公司 Electronic device, information synchronization method, and computer-readable storage medium

Also Published As

Publication number Publication date
CN113489880A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
WO2015046667A1 (en) Smart watch and control method thereof
CN109976570B (en) Data transmission method and device and display device
JP2018523142A (en) Pass-through display of captured images
CN110333834B (en) Frame frequency adjusting method and device, display device and computer readable storage medium
WO2018070803A1 (en) Method and apparatus for session control support for field of view virtual reality streaming
WO2021218694A1 (en) Video processing method and mobile terminal
WO2023005424A1 (en) Electronic device, information synchronization method, and computer readable storage medium
WO2018040269A1 (en) Image processing method and terminal
CN106375642B (en) Image acquisition and processing device and object of which movement image capturing system
WO2021147465A1 (en) Image rendering method, electronic device, and system
WO2018076354A1 (en) Image data frame synchronization method, image signal processing device and terminal
WO2017005070A1 (en) Display control method and device
CN111312207B (en) Text-to-audio method, text-to-audio device, computer equipment and storage medium
CN114666455A (en) Shooting control method and device, storage medium and electronic device
CN110999274B (en) Synchronizing image capture in multiple sensor devices
WO2019179413A1 (en) Depth-of-field image generating method and mobile terminal
US11611708B2 (en) Apparatus for stabilizing digital image, operating method thereof, and electronic device having the same
CN114040252A (en) Display frame rate control method and device, computer readable medium and electronic device
CN113489879A (en) Information synchronization method, electronic device, and computer-readable storage medium
CN114008570B (en) Touch display device, touch response method and system thereof, and storage medium
US7619634B2 (en) Image display apparatus and image data transfer method
CN113489878A (en) Electronic device, information synchronization method, and computer-readable storage medium
CN114071007A (en) Image processing method, multimedia processing chip and electronic equipment
CN110519319B (en) Method and device for splitting partitions
WO2022262449A1 (en) Image data processing method, multimedia processing chip, and electronic device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE