Image processing method and electronic device
By performing integrity checks and downsampling on the data when the image sensor is off, the data mismatch problem between the image signal processor and the sensor is solved, ensuring the stability of the image preview function and the reliability of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-31
- Publication Date
- 2026-03-31
AI Technical Summary
Data mismatch between the image signal processor and the image sensor can cause data overflow, affecting the camera's image preview function.
When an image sensor shutdown signal is detected, image data is output to the memory for data integrity verification. If the verification passes, the data is read; otherwise, the data is deleted. When the data volume is too large, downsampling is performed to ensure that the data volume meets the throughput of the image signal processor.
This avoids data overflow when the image sensor is off, ensures normal image preview function, and improves data processing speed and reliability.
Smart Images

Figure CN115484357B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method and electronic device. Background Technology
[0002] In related technologies, the image signal processor (ISP) of a camera is a unit used to process the signals output by the front-end image sensor. Simply put, the goal of the image signal processor is to improve the visual acuity of the "digital eye" to the level of the "human eye," making the digital image appear as close as possible to the real-world scene seen by the human eye.
[0003] However, a mismatch can easily occur between the image signal processor and the image sensor, leading to data overflow and affecting the camera's image preview function. Summary of the Invention
[0004] To overcome the problems existing in the related technologies, this disclosure provides an image processing method and an electronic device to avoid data overflow affecting the image preview function when the image sensor is turned off.
[0005] According to a first aspect of the present disclosure, an image processing method is provided, comprising:
[0006] Upon detecting a shutdown signal from the image sensor, the first image data acquired by the image sensor is output to the memory, and the data integrity of the first image data is verified.
[0007] If the first image data passes the data integrity check, the image signal processor is controlled to read the first image data from the memory;
[0008] If the first image data fails the data integrity check, the memory is controlled to delete the first image data.
[0009] In one embodiment, before performing data integrity verification on the first image data, the method further includes:
[0010] The frame header and / or frame tail of the first image data are cached; the frame header and / or frame tail include a check value;
[0011] The data integrity verification of the first image data includes:
[0012] The first image data is verified for data integrity based on the frame header and / or the frame tail.
[0013] In one embodiment, the method further includes:
[0014] The first amount of data transmitted per unit time when the image sensor outputs the first image data is obtained;
[0015] When the first data volume is greater than the throughput of the image signal processor, the first image data is downsampled to obtain second image data, and the second image data is output to the image signal processor; wherein, when the second image data is output to the image signal processor, the amount of second data transmitted per unit time is less than or equal to the throughput.
[0016] In one embodiment, acquiring the first data amount transmitted per unit time when the image sensor outputs the first image data includes:
[0017] The resolution of each frame of the image and the frame rate of the image sensor when outputting the first image data are obtained;
[0018] The first data volume is obtained based on the resolution and the frame rate.
[0019] In one embodiment, the first image data includes a plurality of pixels arranged in an array;
[0020] The first image data is downsampled to obtain the second image data, including:
[0021] For the first image data of each frame output by the image sensor, multiple pixels are sampled at intervals to obtain the second image data.
[0022] In one embodiment, the plurality of pixels are arranged in an array along a first direction and a second direction, wherein the first direction is perpendicular to the second direction;
[0023] The second image data is obtained by sampling multiple pixels at intervals, including:
[0024] The second image data is obtained by sampling multiple pixels at intervals in the first direction and the second direction respectively.
[0025] In one embodiment, sampling multiple pixels at intervals in the second direction includes:
[0026] Determine the output frequency of the image sensor that outputs the first image data;
[0027] The sampling frequency is determined to be a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1.
[0028] Multiple pixels are sampled at intervals in the second direction according to the sampling frequency.
[0029] In one embodiment, when the first data volume is less than or equal to the throughput, the first image data is acquired, the first image data is transmitted to the image signal processor, and the first image data is output to the memory.
[0030] According to a second aspect of the present disclosure, an electronic device is provided, comprising:
[0031] The verification module is configured to output the first image data acquired by the image sensor to the memory and perform data integrity verification on the first image data when a shutdown signal of the image sensor is detected.
[0032] The reading module is configured to control the image signal processor to read the first image data from the memory if the first image data passes the data integrity check.
[0033] The deletion module is configured to control the memory to delete the first image data if the first image data fails the data integrity check.
[0034] In one embodiment, the electronic device further includes:
[0035] The acquisition module is configured to acquire the first amount of data transmitted by the image sensor per unit time when the image sensor outputs the first image data after the image sensor is turned on;
[0036] The sampling module is further configured to downsample the first image data to obtain second image data when the first data volume is greater than the throughput of the image signal processor, and output the second image data to the image signal processor; wherein the second data volume transmitted per unit time when outputting the second image data to the image signal processor is less than or equal to the throughput.
[0037] According to a third aspect of the present disclosure, an electronic device is provided, including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to implement the method described above.
[0038] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0039] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: When a signal indicating that the image sensor is off is detected, the first image data acquired by the image sensor is output to the memory, and a data integrity check is performed on the first image data. If the first image data passes the data integrity check, the image signal processor is controlled to read the first image data from the memory; if the first image data fails the data integrity check, the memory is controlled to delete the first image data. This avoids data overflow affecting the image preview function when the image sensor is off.
[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0042] Figure 1 This is a structural block diagram of an electronic device according to an exemplary embodiment.
[0043] Figure 2 This is a flowchart illustrating an image processing method according to an exemplary embodiment.
[0044] Figure 3 This is a flowchart illustrating an image processing method according to an exemplary embodiment.
[0045] Figure 4 This is a flowchart illustrating an image processing method according to an exemplary embodiment.
[0046] Figure 5 This is a schematic diagram illustrating the output clock and sampling clock according to an exemplary embodiment.
[0047] Figure 6 This is a block diagram illustrating an electronic device according to another exemplary embodiment.
[0048] Figure 7 This is a block diagram illustrating an electronic device according to another exemplary embodiment. Detailed Implementation
[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0050] In related technologies, the image signal processor (ISP) of a camera is a unit used to process the signals output by the front-end image sensor. However, a mismatch can easily occur between the image signal processor and the image sensor, leading to data overflow. For example, if the image sensor is turned off, but the sensor image happens to truncate a frame of image data being transmitted, the ISP will not receive a complete image data, data verification will fail, and the data will overflow, affecting the image preview function.
[0051] To address the aforementioned technical problems, this disclosure provides an image processing method and an electronic device to prevent data overflow from affecting the image preview function when the image sensor is turned off.
[0052] Figure 1 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Figure 2 This is a flowchart illustrating an image processing method according to an exemplary embodiment. Figure 2 The image processing method shown is applied to Figure 1 The electronic device shown can be a mobile phone or a camera, but is not limited to these.
[0053] In this embodiment, as Figure 1 As shown, the electronic device includes an image sensor 11, a processing chip 12, an image signal processor (ISP) 13, and a memory 14. The processing chip 12 is connected to the image sensor 11, the image signal processor 13, and the memory 14, respectively. The memory 14 is connected to the image signal processor 13.
[0054] In this embodiment, the image sensor 11 is used to acquire image data, and the image signal processor 13 is used to process the image data acquired by the image sensor 11 and to preview the image acquired by the image sensor 11.
[0055] In this embodiment, the processing chip 12 can be an FPGA (Field Programmable Gate Array). FPGAs can utilize resources in parallel and have strong computing power. In other embodiments, the processing chip 12 can be an ASIC (Application-Specific Integrated Circuit).
[0056] In this embodiment, the memory 14 may be DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory), but is not limited to this. The memory 14 is used to store image data, and the image data stored in the memory 14 can be used for taking pictures or data integrity verification.
[0057] In this embodiment, as Figure 2 As shown, the image processing method includes the following steps: S201~S203:
[0058] In step S201, when a shutdown signal of the image sensor is detected, the first image data acquired by the image sensor is output to the memory, and the data integrity of the first image data is verified.
[0059] In this embodiment, the image sensor 11 may include a pin. When the level signal output by the pin is a high-level signal, it indicates that the image sensor 11 is turned off. The processing chip 12 can confirm whether a turn-off signal of the image sensor 11 has been detected by detecting whether the level signal output by the pin is a high-level signal. When the processing chip 12 detects that the level signal output by the pin is a high-level signal, it confirms that a turn-off signal of the image sensor 11 has been detected.
[0060] In this embodiment, after detecting the received shutdown signal, the processing chip 12 outputs the first image data to the memory 14 and performs data integrity verification on the first image data. The first image data may include a frame header, a valid image data portion, and a frame tail. In this embodiment, the frame header may include a data verification header, the valid image data portion is the image data acquired by the image sensor 11, and the frame tail may include a data verification tail. The data verification header and data verification tail are used to perform data integrity verification on the first image data. Of course, in other embodiments, only the frame header or only the frame tail may be used for data integrity verification.
[0061] In this embodiment, before performing data integrity verification on the first image data, the processing chip 12 can first cache the frame header and frame tail of the first image data. When performing data integrity verification on the first image data, the processing chip 12 can perform data integrity verification on the first image data based on the frame header, the frame tail, a preset data verification header, and a preset data verification tail. Specifically, when the data verification header in the frame header is the same as the preset data verification header, and the data verification tail in the frame tail is the same as the preset data verification tail, the first image data can be confirmed to have passed the data integrity verification; otherwise, the first image data is confirmed to have failed the data integrity verification. For example, when the data verification header in the frame header is the same as the preset data verification header, but the data verification tail in the frame tail is different from the preset data verification tail, the first image data is confirmed to have failed the data integrity verification. Alternatively, if the frame tail is missing, the first image data can be confirmed to have failed the data integrity verification.
[0062] Of course, other verification methods can also be used to verify the integrity of the first image data, such as CRC check, but are not limited to the verification methods mentioned above.
[0063] In step S202, if the first image data passes the data integrity check, the image signal processor is controlled to read the first image data from the memory.
[0064] In step S203, if the first image data fails the data integrity check, the control memory deletes the first image data.
[0065] In this embodiment, after confirming that the first image data has failed the data integrity check, the processing chip 12 can control the memory 14 to delete the first image data containing errors, which can prevent problems affecting the image preview function caused by the image signal processor 13 reporting errors.
[0066] In this embodiment, when an image sensor shutdown signal is detected, the first image data acquired by the image sensor is output to the memory, and a data integrity check is performed on the first image data. If the first image data passes the data integrity check, the image signal processor is controlled to read the first image data from the memory; if the first image data fails the data integrity check, the memory is controlled to delete the first image data. This avoids data overflow affecting the image preview function when the image sensor is turned off.
[0067] In this embodiment, before detecting the image sensor's shutdown signal, such as Figure 3 As shown, the image processing method may further include the following steps S301 to S303:
[0068] In step S301, the first amount of data transmitted per unit time when the image sensor 11 outputs the first image data is obtained.
[0069] In this embodiment, after the image sensor 11 is turned on, the processing chip 12 acquires the first amount of data transmitted per unit time when the image sensor 11 outputs the first image data. For example... Figure 4 As shown, step S301 may include the following steps S3011 to S3012:
[0070] In step S3011, the resolution of each frame image and the frame rate of the image sensor 11 when outputting the first image data are obtained.
[0071] In this embodiment, the resolution of the image output by the image sensor 11 and the frame rate of the image sensor 11 when outputting the first image data can be preset. The processing chip 12 can obtain the resolution of each frame of the image output by the image sensor 11 and the frame rate of the image sensor 11 when outputting the first image data.
[0072] In this embodiment, the resolution of the images output by the image sensor 11 may differ in different operating modes. For example, the operating modes may include a photo-taking mode and a video-recording mode. When the image sensor 11 is in photo-taking mode, the aspect ratio of the output image is 4:3, and when the image sensor 11 is in video-recording mode, the aspect ratio of the output image is 16:9. Therefore, the resolution of the image output by the image sensor 11 in photo-taking mode is different from the resolution of the image output in video-recording mode.
[0073] In step S3012, the first data volume is obtained according to the resolution and frame rate of each frame image.
[0074] In this embodiment, the processing chip 12 can obtain the first data amount based on the product of the image resolution and the frame rate. For example, the product of the image resolution and the frame rate can be used as the first data amount. For example, when the image sensor 11 is in the shooting mode, the image resolution is 30M and the frame rate is 30 frames / second, then the first data amount is 900M.
[0075] In step S302, when the first data volume is greater than the throughput of the image signal processor, the first image data is downsampled to obtain the second image data, and the second image data is output to the image signal processor; wherein, when the second image data is output to the image signal processor, the second data volume transmitted per unit time is less than or equal to the throughput of the image signal processor.
[0076] In this embodiment, the throughput of the image signal processor 13 is the amount of image data successfully received per unit time. The throughput of the image signal processor 13 can be measured in units such as bits, bytes, and packets.
[0077] In this embodiment, the processing chip 12 compares the first data volume with the throughput of the image signal processor 13, and determines the processing method of the first image data of each frame of the image output by the image sensor 11 based on the comparison result.
[0078] In this embodiment, the processing chip 12 can compare the first data volume with the throughput of the image signal processor 13. For example, the processing chip 12 can determine whether the first data volume is greater than the throughput of the image signal processor 13. When the first data volume is greater than the throughput, the processing chip 12 downsamples the first image data of each frame to obtain the second image data, and outputs the second image data to the image signal processor 13. The processing chip 12 also acquires the first image data and sends the first image data to the memory 14. When the processing chip 12 outputs image data to the image signal processor 13, the second data volume transmitted per unit time is less than or equal to the throughput of the image signal processor 13.
[0079] In this embodiment, the first image data of each frame can be the raw image data acquired by the image sensor 11, and the second image data can be the preview image data. The preview image data is used to allow the user to preview the image acquired by the image sensor 11 so that the user can confirm whether the image acquired by the image sensor 11 meets the user's needs.
[0080] In this embodiment, the first image data includes a plurality of pixels arranged in an array, the plurality of pixels being arranged in an array along a first direction and a second direction, the first direction being perpendicular to the second direction. For example, the first direction can be a column direction and the second direction can be a row direction, but is not limited thereto.
[0081] In this embodiment, the downsampling processing of the first image data of each frame by the processing chip 12 may include: for the first image data of each frame output by the image sensor 11, the processing chip 12 samples multiple pixels at intervals to obtain the second image data. For example, the processing chip 12 collects data from one pixel every other pixel to obtain the second image data. In this way, the aspect ratio of the image displayed according to the second image data is the same as the aspect ratio of the image displayed according to the first image data. The amount of data in the second image data is 0.5 times the amount of data in the first image data, and the area of the image displayed according to the second image data is 0.25 times the area of the image displayed according to the first image data.
[0082] In this embodiment, the processing chip 12 performs interval sampling on multiple pixels to obtain the second image data, which may include: performing interval sampling on multiple pixels in a first direction and a second direction respectively to obtain the second image data.
[0083] First, a method for interval sampling of multiple pixels in a first direction is introduced: the processing chip 12 can perform interval sampling of pixels arranged along a second direction in the first direction. In this embodiment, the processing chip 12 can collect data of odd-numbered rows of pixels arranged along the first direction, or collect data of even-numbered rows of pixels arranged along the first direction, thereby achieving interval sampling of pixels arranged along the second direction in the first direction. For example, the processing chip 12 can collect data of odd-numbered rows of pixels, or collect data of even-numbered rows of pixels.
[0084] Secondly, we introduce a method for sampling multiple pixels at intervals in the second direction, that is, a method for sampling at intervals for each row of pixels.
[0085] In this embodiment, the image sensor 11 may be a CMOS (Complementary Metal Oxide Semiconductor) image sensor 11, but is not limited to this.
[0086] In this embodiment, the processing chip 12 can first determine the output frequency of the first image data output by the image sensor. Then, the processing chip 12 determines the sampling frequency as a predetermined multiple of the output frequency. The predetermined multiple is a positive number less than 1, for example, 0.5 times. Then, the processing chip 12 can perform interval sampling on multiple pixels in the second direction according to the sampling frequency.
[0087] In one exemplary embodiment, the processing chip 12 may first determine a first clock frequency of the output clock in the image sensor 11 used to control the output image data. Then, the processing chip 12 determines a second clock frequency of the sampling clock as 0.5 times the first clock frequency, wherein the sampling clock is used to control the interval sampling of pixels arranged along a second direction. Figure 5 As shown, the second clock frequency of the sampling clock RCLK is 0.5 times the first clock frequency of the output clock PCLK. Then, the processing chip 12 uses the sampling clock to perform interval sampling on the pixels arranged along the second direction. This allows for interval sampling of pixels arranged along the second direction.
[0088] In this embodiment, the processing chip 12 performs interval sampling for each row of pixels arranged along the second direction. Alternatively, the processing chip 12 performs interval sampling for each row of pixels.
[0089] In this embodiment, for each row of pixels arranged along the second direction, the processing chip 12 can collect data for every other pixel. For example, when the processing chip 12 collects data for odd-numbered rows of pixels, it can collect data for every other pixel in each odd-numbered row.
[0090] In this embodiment, the processing chip 12 uses the above method to sample multiple pixels at intervals in the first direction and the second direction respectively, so as to obtain the second image data.
[0091] In this embodiment, when the processing chip 12 outputs second image data to the image signal processor 13, the amount of second data transmitted per unit time is less than or equal to the throughput of the image signal processor 13. The amount of second data transmitted per unit time when the processing chip 12 outputs second image data to the image signal processor 13 is the product of the amount of second image data and the frame rate at which the processing chip 12 outputs the second image data to the image signal processor 13. This avoids problems caused by data overflow received by the image signal processor 13, such as the inability to preview images, electronic devices, or cameras malfunctioning due to data overflow.
[0092] In this embodiment, the processing chip 12 also acquires first image data and sends the first image data to the memory 14. The first image data stored in the memory 14 is used for taking pictures or data integrity verification.
[0093] In this embodiment, the processing chip 12 acquires first image data and second image data through a ping-pong operation, and sends the first image data and second image data to the memory 14 and the image signal processor 13 respectively, thereby improving the data processing speed.
[0094] In step S303, when the first data volume is less than or equal to the throughput, the first image data is acquired, the first image data is transmitted to the image signal processor, and the first image data is output to the memory.
[0095] In this embodiment, when the first data volume is less than or equal to the throughput of the image signal processor 13, the processing chip 12 acquires the first image data, transmits the first image data to the image signal processor 13, and outputs the first image data to the memory 14.
[0096] In this embodiment, after the image sensor 11 is turned on, the processing chip 12 acquires the first data volume transmitted by the image sensor 11 per unit time when outputting image data, and compares this first data volume with the throughput of the image signal processor 13. When the first data volume is greater than the throughput, the processing chip 12 downsamples the first image data to obtain second image data, and outputs the second image data to the image signal processor 13. Specifically, the second data volume transmitted by the processing chip 12 per unit time when outputting image data to the image signal processor 13 is less than or equal to the throughput. This avoids the problem caused by the first data volume transmitted by the image sensor 11 per unit time when outputting image data being greater than the throughput of the image signal processor 13.
[0097] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. (e.g.) Figure 6 As shown, in this embodiment, the electronic device includes:
[0098] The verification module 61 is configured to output the first image data acquired by the image sensor to the memory and perform data integrity verification on the first image data when a shutdown signal of the image sensor is detected.
[0099] The reading module 62 is configured to control the image signal processor to read the first image data from the memory when the first image data passes the data integrity check;
[0100] The deletion module 63 is configured to control the memory to delete the first image data if the first image data fails the data integrity check.
[0101] In one embodiment, the electronic device further includes:
[0102] A caching module is configured to cache the frame header and / or frame trailer of the first image data; the frame header and / or frame trailer include a checksum.
[0103] The verification module 61 is also configured to perform data integrity verification on the first image data based on the frame header and / or the frame tail.
[0104] In one embodiment, the electronic device further includes:
[0105] The acquisition module is configured to acquire the first amount of data transmitted per unit time when the image sensor outputs the first image data after the image sensor is turned on.
[0106] The sampling module is further configured to downsample the first image data to obtain second image data when the first data volume is greater than the throughput of the image signal processor, and output the second image data to the image signal processor; wherein the second data volume transmitted per unit time when outputting the second image data to the image signal processor is less than or equal to the throughput.
[0107] In one embodiment, the acquisition module includes:
[0108] The first acquisition submodule is configured to acquire the resolution of each frame of the image and the frame rate of the image sensor when outputting the first image data;
[0109] The second acquisition submodule is configured to acquire the first data amount based on the resolution and the frame rate.
[0110] In one embodiment, the first image data includes a plurality of pixels arranged in an array;
[0111] The sampling module is also configured to sample multiple pixels at intervals for the first image data of each frame of the image output by the image sensor to obtain the second image data.
[0112] In one embodiment, the plurality of pixels are arranged in an array along a first direction and a second direction, wherein the first direction is perpendicular to the second direction;
[0113] The sampling module is also configured to sample multiple pixels at intervals in the first direction and the second direction respectively to obtain the second image data.
[0114] In one embodiment, the sampling module further includes:
[0115] The first determining submodule is configured to determine the output frequency of the image sensor outputting the first image data;
[0116] The second determining submodule is configured to determine the sampling frequency as a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1.
[0117] The sampling submodule is configured to sample multiple pixels at intervals in the second direction according to the sampling frequency.
[0118] In one embodiment, the electronic device further includes:
[0119] The transmission module is configured to acquire the first image data, transmit the first image data to the image signal processor, and output the first image data to the memory when the first data volume is less than or equal to the throughput.
[0120] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. For example, device 1000 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc.
[0121] Reference Figure 7 The device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.
[0122] Processing component 1002 typically controls the overall operation of device 1000, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1002 may include one or more modules to facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.
[0123] Memory 1004 is configured to store various types of data to support the operation of device 1000. Examples of this data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, etc. Memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0124] The power supply component 1006 provides power to the various components of the device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1000.
[0125] Multimedia component 1008 includes a screen that provides an output interface between device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When device 1000 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0126] Audio component 1010 is configured to output and / or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when device 1000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
[0127] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0128] Sensor assembly 1014 includes one or more sensors for providing state assessments of various aspects of device 1000. For example, sensor assembly 1014 may detect the on / off state of device 1000, the relative positioning of components such as the display and keypad of device 1000, changes in the position of device 1000 or a component of device 1000, the presence or absence of user contact with device 1000, the orientation or acceleration / deceleration of device 1000, and temperature changes of device 1000. Sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1014 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0129] Communication component 1016 is configured to facilitate wired or wireless communication between device 1000 and other devices. Device 1000 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1016 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0130] In an exemplary embodiment, device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0131] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, which can be executed by a processor 1020 of device 1000 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0132] Regarding the apparatus in the above embodiments, the specific manner in which the processor performs the operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0133] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0134] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized by, The application is applied to an electronic device, which comprises an image sensor, a processing chip, an image signal processor and a memory, the processing chip is connected with the image sensor, the image signal processor and the memory respectively, the memory is connected with the image signal processor, and the method comprises the following steps: In the case that a closing signal of the image sensor is detected, the processing chip outputs first image data collected by the image sensor to the memory, and performs data integrity check on the first image data, and the memory is used for storing the first image data; If the first image data passes the data integrity check, the image signal processor is controlled to read the first image data from the memory, and the image signal processor is used for processing the first image data and previewing an image; If the first image data does not pass the data integrity check, the processing chip controls the memory to delete the first image data.
2. The method of claim 1, wherein, Before the data integrity check on the first image data, the following steps are further included: The frame header and / or the frame tail of the first image data are cached, and the check value is included in the frame header and / or the frame tail; The data integrity check on the first image data comprises the following steps: The data integrity check on the first image data is performed according to the frame header and / or the frame tail.
3. The method of claim 1, wherein, Further comprising the following steps: The first data amount transmitted by the image sensor per unit time when the first image data is output is acquired; When the first data amount is greater than the throughput of the image signal processor, the first image data is down-sampled to obtain second image data, and the second image data is output to the image signal processor; wherein the second data amount transmitted by the image signal processor per unit time when the second image data is output is less than or equal to the throughput.
4. The method of claim 3, wherein, The first data amount transmitted by the image sensor per unit time when the first image data is output is acquired, comprising the following steps: The resolution of each frame of image and the frame rate of the image sensor when the first image data is output are acquired; The first data amount is acquired according to the resolution and the frame rate.
5. The method of claim 3, wherein, The first image data comprises a plurality of pixels arranged in an array; The first image data is down-sampled to obtain second image data, comprising the following steps: For the first image data of each frame of image output by the image sensor, a plurality of pixels are interval-sampled to obtain the second image data.
6. The method of claim 5, wherein, The plurality of pixels are arranged in an array along a first direction and a second direction, and the first direction is perpendicular to the second direction; The plurality of pixels are interval-sampled to obtain the second image data, comprising the following steps: The plurality of pixels are interval-sampled in the first direction and the second direction respectively to obtain the second image data.
7. The method of claim 6, wherein, The plurality of pixels are interval-sampled in the second direction, comprising the following steps: The output frequency of the image sensor when the first image data is output is determined; The sampling frequency is determined as a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1; The plurality of pixels are interval-sampled in the second direction according to the sampling frequency.
8. The method of claim 3, wherein, when the first data amount is less than or equal to the throughput, collecting the first image data, transmitting the first image data to the image signal processor, and outputting the first image data to a memory.
9. An electronic device, comprising: The electronic device comprises an image sensor, a processing chip, an image signal processor and a memory, the processing chip is connected with the image sensor, the image signal processor and the memory respectively, the memory is connected with the image signal processor, and the electronic device comprises: a checking module configured to, when a shutdown signal of the image sensor is detected, output first image data collected by the image sensor to the memory, and perform data integrity checking on the first image data, and the memory is configured to store the first image data; a reading module configured to, when the first image data passes the data integrity checking, control the image signal processor to read the first image data from the memory, and the image signal processor is configured to process the first image data and preview an image; a deleting module configured to, when the first image data fails the data integrity checking, control the memory to delete the first image data.
10. The electronic device of claim 9, wherein, Further comprising: an obtaining module configured to, after the image sensor is turned on, obtain a first data amount transmitted by the image sensor per unit time when the first image data is outputted; a sampling module further configured to, when the first data amount is greater than a throughput of the image signal processor, perform down-sampling processing on the first image data to obtain second image data, and output the second image data to the image signal processor, wherein a second data amount transmitted by the image signal processor per unit time when the second image data is outputted is less than or equal to the throughput.
11. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory is configured to store a computer program, and the processor is configured to execute the computer program stored on the memory to implement the method of any one of claims 1-8.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Apparatus and method for image capturing and camera shooting
CN101247475A
Image signal processing method and device, electronic equipment and readable storage medium
CN111698414A
Digital image shooting device with time-space information and original identification
CN202535461U