CN115484357A - Image processing method and electronic device - Google Patents

Image processing method and electronic device Download PDF

Info

Publication number
CN115484357A
CN115484357A CN202110604797.6A CN202110604797A CN115484357A CN 115484357 A CN115484357 A CN 115484357A CN 202110604797 A CN202110604797 A CN 202110604797A CN 115484357 A CN115484357 A CN 115484357A
Authority
CN
China
Prior art keywords
image data
image
data
memory
signal processor
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110604797.6A
Other languages
Chinese (zh)
Inventor
霍文甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110604797.6A priority Critical patent/CN115484357A/en
Publication of CN115484357A publication Critical patent/CN115484357A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure relates to an image processing method and an electronic device, the method comprising: under the condition that a closing signal of the image sensor is detected, outputting first image data acquired by the image sensor to a memory, and carrying out data integrity verification on the first image data; if the first image data passes the data integrity verification, controlling the image signal processor to read the first image data from the memory; and if the first image data does not pass the data integrity check, controlling the memory to delete the first image data. According to the technical scheme, the image preview function can be prevented from being influenced by data overflow when the image sensor is closed.

Description

Image processing method and electronic device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method and an electronic device.
Background
In the related art, an Image Signal Processor (ISP) of a camera is a unit for processing a Signal output from an Image sensor at a front end. Generally speaking, what the image signal processor needs to do is to raise the visual level of the 'digital eyes' to the level of the 'human eyes', so that the effect of seeing a digital image by human eyes is as close as possible to the effect of seeing a real scene by human eyes.
However, the problem that data sent by the image sensor is not matched with data received by the image signal processor and then data overflows is easily caused between the image signal processor and the image sensor, and the image preview function of the camera is affected.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide an image processing method and an electronic device, so as to avoid data overflow when an image sensor is turned off from affecting an image preview function.
According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method including:
under the condition that a closing signal of an image sensor is detected, outputting first image data acquired by the image sensor to a memory, and carrying out data integrity verification on the first image data;
if the first image data passes the data integrity check, controlling an image signal processor to read the first image data from the memory;
and if the first image data does not pass the data integrity check, controlling the memory to delete the first image data.
In one embodiment, before performing the data integrity check on the first image data, the method further includes:
buffering a frame header and/or a frame trailer of the first image data; the frame head and/or the frame tail comprise a check value;
the performing data integrity check on the first image data includes:
and carrying out data integrity check on the first image data according to the frame head and/or the frame tail.
In one embodiment, the method further comprises:
acquiring a first data volume transmitted by the image sensor in unit time when the first image data is output;
when the first data volume is larger than the throughput of the image signal processor, performing down-sampling processing on the first image data to obtain second image data, and outputting the second image data to the image signal processor; wherein a second data amount transmitted per unit time when the second image data is output to the image signal processor is less than or equal to the throughput.
In one embodiment, the acquiring a first amount of data transferred by the image sensor per unit time when outputting the first image data includes:
acquiring the resolution of each frame of image and the frame rate of the image sensor when outputting the first image data;
and acquiring the first data volume according to the resolution and the frame rate.
In one embodiment, the first image data includes a plurality of pixels arranged in an array;
the down-sampling processing is carried out on the first image data to obtain second image data, and the method comprises the following steps:
and aiming at the first image data of each frame of image output by the image sensor, carrying out interval sampling on a plurality of pixels to obtain the second image data.
In one embodiment, the plurality of pixels are arrayed along a first direction and a second direction, the first direction being perpendicular to the second direction;
the sampling at intervals is performed on a plurality of pixels to obtain the second image data, and the sampling comprises:
and carrying out interval sampling on a plurality of pixels in the first direction and the second direction respectively to obtain the second image data.
In one embodiment, the sampling of the plurality of pixels at intervals in the second direction comprises:
determining an output frequency at which the image sensor outputs the first image data;
determining a sampling frequency as a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1;
and sampling a plurality of pixels at intervals in the second direction according to the sampling frequency.
In one embodiment, when the first data amount is less than or equal to the throughput, the first image data is acquired, transmitted to the image signal processor, and output to a memory.
According to a second aspect of an embodiment of the present disclosure, there is provided an electronic device including
The verification module is configured to output first image data acquired by an image sensor to a memory and perform data integrity verification on the first image data under the condition that a closing signal of the image sensor is detected;
a reading module configured to control the image signal processor to read the first image data from the memory if the first image data passes a data integrity check;
a deletion module configured to control the memory to delete the first image data if the first image data fails a data integrity check.
In one embodiment, the electronic device further includes:
the acquisition module is configured to acquire a first data volume transmitted by the image sensor in unit time when the image sensor outputs the first image data after the image sensor is started;
the sampling module is further configured to 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 under the condition that the first data volume is larger than the throughput of the image signal processor; wherein a second data amount transmitted per unit time when the second image data is output to the image signal processor is less than or equal to the throughput.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising a processor and a memory; the memory for storing a computer program; the processor is configured to execute the computer program stored in the memory, and implement the method.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: under the condition that a closing signal of the image sensor is detected, first image data collected by the image sensor is output to the memory, data integrity check is conducted 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, and if the first image data does not pass the data integrity check, the memory is controlled to delete the first image data. In this way, it is possible to avoid data overflow from affecting the image preview function when the image sensor is turned off.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a block diagram illustrating the structure of an electronic device according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating an image processing method according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating an image processing method according to an exemplary embodiment.
FIG. 4 is a flow diagram illustrating an image processing method according to an exemplary embodiment.
FIG. 5 is a schematic diagram illustrating an output clock and a sampling clock in accordance with an exemplary embodiment.
FIG. 6 is a block diagram of an electronic device shown in accordance with another example embodiment.
FIG. 7 is a block diagram illustrating an electronic device in accordance with another example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
In the related art, an Image Signal Processor (ISP) of a camera is a unit for processing a Signal output from an Image sensor at a front end. However, a problem that data sent by the image sensor and data received by the image signal processor do not match and thus data overflow easily occurs between the image signal processor and the image sensor. For example, the image sensor is turned off, but at this time, the image sensor image just cuts off one frame of image data being transmitted, so that the ISP cannot receive a complete piece of image data, the data verification fails, and the image preview function is affected due to downward overflow.
In order to solve the above technical problem, embodiments of the present disclosure provide an image processing method and an electronic device, so as to affect an image preview function due to data overflow when an image sensor is turned off.
Fig. 1 is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Fig. 2 is a flowchart illustrating an image processing method according to an exemplary embodiment, the image processing method illustrated in fig. 2 being applied to the electronic device illustrated in fig. 1. The electronic device may be a cell phone or a camera, but is not limited thereto.
In the present embodiment, as shown in fig. 1, 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, and the memory 14 is connected to the image signal processor 13.
In the present embodiment, the image sensor 11 is used for acquiring image data, and the image signal processor 13 is used for processing the image data acquired by the image sensor 11 and previewing the image acquired by the image sensor 11.
In this embodiment, the processing chip 12 may be an FPGA (Field Programmable Gate Array). The FPGA can utilize resources in parallel, and the computing power is strong. In other embodiments, the processing chip 12 may be an ASIC (application specific chip).
In the present embodiment, the memory 14 may be a DDR SDRAM (double data rate synchronous dynamic random access memory), but is not limited thereto. The memory 14 is used for storing image data, and the image data stored in the memory 14 can be used for photographing or data integrity check.
In the present embodiment, as shown in fig. 2, the image processing method includes the steps of: s201 to S203:
in step S201, when a shutdown signal of the image sensor is detected, first image data collected by the image sensor is output to a memory, and data integrity check is performed on the first image data.
In this embodiment, the image sensor 11 may include a pin, and 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 the off signal of the image sensor 11 is detected by detecting whether the level signal output from the pin is a high level signal. When the processing chip 12 detects that the level signal output from the pin is a high level signal, it confirms that the shutdown signal of the image sensor 11 is detected.
In this embodiment, after detecting that the shutdown signal is received, the processing chip 12 outputs the first image data to the memory 14, and performs data integrity check on the first image data. The first image data may include a frame header, an effective image data portion, and a frame trailer. In this embodiment, the frame header may include a data verification header, the valid image data portion is image data collected by the image sensor 11, and the frame trailer may include a data verification trailer. And the data verification head and the data verification tail are used for carrying out data integrity verification on the first image data. Of course, in other embodiments, the data integrity check may be performed only by the frame header or only by the frame trailer.
In this embodiment, before performing data integrity check on the first image data, the processing chip 12 may buffer a frame head and a frame tail of the first image data, and when performing data integrity check on the first image data, the processing chip 12 may perform data integrity check on the first image data according to the frame head, the frame tail, a preset data check head, and a preset data check tail. When the data check head in the frame header is the same as the preset data check head and the data check tail in the frame tail is the same as the preset data check tail, it can be determined that the first image data passes the data integrity check, otherwise, it can be determined that the first image data does not pass the data integrity check, for example, when the data check head in the frame header is the same as the preset data check head and the data check tail in the frame tail is different from the preset data check tail, it can be determined that the first image data does not pass the data integrity check, or when the frame tail is missing, it can be determined that the first image data does not pass the data integrity check.
Of course, other verification methods, such as CRC, may also be used to perform the data integrity check on the first image data, and are not limited to the above-mentioned verification methods.
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.
In step S203, if the first image data fails the data integrity check, the memory is controlled to delete the first image data.
In this embodiment, the processing chip 12 may control the memory 14 to delete the first image data with errors after confirming that the first image data fails the data integrity check, so as to prevent the image signal processor 13 from reporting errors and affecting the image preview function.
In this embodiment, when a shutdown signal of the image sensor is detected, the first image data collected by the image sensor is output to the memory, and 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, and if the first image data does not pass the data integrity check, the memory is controlled to delete the first image data. In this way, it is possible to avoid data overflow from affecting the image preview function when the image sensor is turned off.
In this embodiment, before detecting the off signal of the image sensor, as shown in fig. 3, the image processing method may further include the following steps S301 to S303:
in step S301, a first data amount transferred by the image sensor 11 per unit time when outputting the first image data is acquired.
In the present embodiment, after the image sensor 11 is turned on, the processing chip 12 acquires a first data amount transmitted by the image sensor 11 per unit time when outputting the first image data. As shown in fig. 4, step S301 may include the following steps S3011 to S3012:
in step S3011, the resolution of each frame image and the frame rate of the image sensor 11 at the time of outputting the first image data are acquired.
In the present embodiment, the resolution of the image output by the image sensor 11 and the frame rate of the image sensor 11 at the time of outputting the first image data may be set in advance. The processing chip 12 may acquire a resolution of each frame of image output by the image sensor 11 and a frame rate of the image sensor 11 when outputting the first image data.
In this embodiment, the resolution of the image output by the image sensor 11 in different operation modes may be different. For example, the operational modes may include a picture taking mode and a picture recording mode. Since the screen ratio of the image output by the image sensor 11 in the photographing mode is 4.
In step S3012, a first data amount is obtained according to the resolution and frame rate of each frame of image.
In the present embodiment, the processing chip 12 may obtain the first data amount according to a product of the resolution and the frame rate of the image, for example, the product of the resolution and the frame rate of the image is taken as the first data amount. For example, when the image sensor 11 is in the photographing mode, the resolution of the image is 30M, the frame rate is 30 frames/second, and then the first data amount is 900M.
In step S302, when the first data amount is greater than the throughput of the image signal processor, performing down-sampling processing on the first image data to obtain second image data, and outputting the second image data to the image signal processor; wherein a second data amount transferred per unit time when the second image data is output to the image signal processor is less than or equal to a throughput of the image signal processor.
In the present embodiment, the throughput of the image signal processor 13 is the data amount of successfully receiving the image data per unit time, and the throughput of the image signal processor 13 can be measured in units of bits, bytes, packets, and the like.
In this embodiment, the processing chip 12 compares the first data amount with the throughput of the image signal processor 13, and determines the processing mode of the first image data of each frame of image output by the image sensor 11 according to the comparison result.
In the present embodiment, the processing chip 12 may compare the first data amount with the throughput of the image signal processor 13, for example, the processing chip 12 may determine whether the first data amount is larger than the throughput of the image signal processor 13. When the first data volume is greater than the throughput, the processing chip 12 performs down-sampling processing on the first image data of each frame of image to obtain second image data, and outputs the second image data to the image signal processor 13, and the processing chip 12 also acquires the first image data and sends the first image data to the memory 14; the second data amount transferred per unit time when the processing chip 12 outputs the image data to the image signal processor 13 is less than or equal to the throughput of the image signal processor 13.
In the present embodiment, the first image data of each frame of image may be raw image data acquired by the image sensor 11, and the second image data may be preview image data. The preview image data is used to enable the user to preview the image captured by the image sensor 11 so that the user can confirm whether the image captured by the image sensor 11 meets the user's needs.
In this embodiment, the first image data includes a plurality of pixels arranged in an array, and 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. For example, the first direction may be a column direction and the second direction may be a row direction, but is not limited thereto.
In this embodiment, the down-sampling the first image data of each frame of image by the processing chip 12 may include: for the first image data of each frame of image output by the image sensor 11, the processing chip 12 performs interval sampling on a plurality of pixels to obtain the second image data. For example, the processing chip 12 acquires data of one pixel every other pixel to obtain the second image data. Thus, the picture scale of the image displayed according to the second image data is the same as the picture scale of the image displayed according to the first image data. Wherein the data amount of the second image data is 0.5 times the data amount of the first image data, and the screen area of the image displayed according to the second image data is 0.25 times the screen area of the image displayed according to the first image data.
In this embodiment, the processing chip 12 performs interval sampling on a plurality of pixels to obtain the second image data, which may include: and carrying out interval sampling on the plurality of pixels in the first direction and the second direction respectively to obtain second image data.
First, a method of sampling a plurality of pixels at intervals in a first direction, respectively, is described: the processing chip 12 may sample the pixels arranged along the second direction at intervals in the first direction. In this embodiment, the processing chip 12 may collect data of pixels arranged in odd rows along the first direction, or collect data of pixels arranged in even rows along the first direction, so as to perform interval sampling on pixels arranged in the second direction in the first direction. For example, the processing chip 12 may collect data for odd rows of pixels or collect data for even rows of pixels.
Next, a method of performing interval sampling on a plurality of pixels in the second direction, that is, a method of performing interval sampling on each line of pixels, will be described.
In the present embodiment, the image sensor 11 may be a CMOS (Complementary Metal Oxide Semiconductor) image sensor 11, but is not limited thereto.
In this embodiment, the processing chip 12 may first determine an output frequency at which the image sensor outputs the first image data, and then the processing chip 12 determines the sampling frequency as a predetermined multiple of the output frequency, the predetermined multiple being a positive number less than 1, for example, 0.5. The processing chip 12 may then sample the plurality of pixels at intervals in the second direction according to the sampling frequency.
In an exemplary embodiment, the processing chip 12 may first determine a first clock frequency of an output clock for controlling output image data in the image sensor 11. Then, the processing chip 12 determines a second clock frequency of a sampling clock for controlling the sampling of the pixels arranged in the second direction at intervals to be 0.5 times the first clock frequency. As shown in fig. 5, 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 performs interval sampling on the pixels arranged in the second direction using the sampling clock. In this way, the interval sampling of the pixels arranged in the second direction can be realized.
In the present embodiment, the processing chip 12 performs the thinning sampling for each line of pixels arranged in the second direction of sampling. Alternatively, the processing chip 12 performs interval sampling for each row of pixels.
In the present embodiment, the processing chip 12 may collect data of one pixel for every other pixel for each line of pixels arrayed in the second direction of sampling. For example, when the processing chip 12 collects data of pixels in odd rows, the processing chip 12 may collect data of one pixel every other pixel for the data of the pixels in the odd rows of each row.
In this embodiment, the processing chip 12 performs interval sampling on the plurality of pixels in the first direction and the second direction respectively by using the method described above, and may obtain the second image data.
In the present embodiment, the second data amount transferred per unit time when the processing chip 12 outputs the second image data to the image signal processor 13 is less than or equal to the throughput of the image signal processor 13. The second data amount transmitted per unit time when the processing chip 12 outputs the second image data to the image signal processor 13 is a product of the data amount of the second image data and the frame rate at which the processing chip 12 outputs the second image data to the image signal processor 13. In this way, it is possible to avoid the problem caused by the overflow of the data received by the image signal processor 13, for example, the problem that the preview of the image is impossible, the electronic device or the camera hangs up, etc. caused by the overflow of the data received by the image signal processor 13.
In this embodiment, the processing chip 12 further acquires first image data and sends the first image data to the memory 14, and the first image data stored in the memory 14 is used for photographing or data integrity verification.
In this embodiment, the processing chip 12 acquires the first image data and the second image data through ping-pong operation, and sends the first image data and the second image data to the memory 14 and the image signal processor 13, respectively, so as to improve the data processing rate.
In step S303, when the first data amount is less than or equal to the throughput, 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.
In this embodiment, when the first data amount 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.
In this embodiment, after the image sensor 11 is turned on, the processing chip 12 obtains a first data amount transmitted within a unit time when the image sensor 11 outputs the image data, and compares the first data amount with a throughput of the image signal processor 13, and when the first data amount is greater than the throughput, the processing chip 12 performs down-sampling processing on the first image data to obtain a second image data, and outputs the second image data to the image signal processor 13, where the second data amount transmitted within the unit time when the processing chip 12 outputs the image data to the image signal processor 13 is less than or equal to the throughput. In this way, it is possible to avoid a problem caused by the first data amount transmitted per unit time being larger than the throughput of the image signal processor 13 when the image sensor 11 outputs the image data.
FIG. 6 is a block diagram of an electronic device shown in accordance with an example embodiment. As shown in fig. 6, in this embodiment, the electronic device includes:
the verification module 61 is configured to output first image data acquired by an image sensor to a memory and perform data integrity verification on the first image data when a shutdown signal of the image sensor is detected;
a reading module 62 configured to control the image signal processor to read the first image data from the memory if the first image data passes a data integrity check;
a deleting module 63 configured to control the memory to delete the first image data if the first image data fails the data integrity check.
In one embodiment, the electronic device further comprises:
a buffer module configured to buffer a frame header and/or a frame trailer of the first image data; the frame head and/or the frame tail comprise a check value;
a checking module 61, further configured to perform data integrity checking on the first image data according to the frame header and/or the frame trailer.
In one embodiment, the electronic device further comprises:
the acquisition module is configured to acquire a first data volume transmitted by the image sensor in unit time when the image sensor outputs the first image data after the image sensor is turned on.
The sampling module is further configured to perform down-sampling processing on the first image data to obtain second image data under the condition that the first data volume is larger than the throughput of the image signal processor, and output the second image data to the image signal processor; wherein a second data amount transmitted per unit time when the second image data is output to the image signal processor is less than or equal to the throughput.
In one embodiment, the acquisition module comprises:
a first acquisition sub-module configured to acquire a resolution of each frame of image and a frame rate of the image sensor when outputting the first image data;
a second obtaining sub-module configured to obtain the first data amount according to the resolution and the frame rate.
In one embodiment, the first image data includes a plurality of pixels arranged in an array;
the sampling module is further configured to sample a plurality of pixels at intervals according to first image data of each frame of image output by the image sensor to obtain second image data.
In one embodiment, the plurality of pixels are arrayed along a first direction and a second direction, the first direction being perpendicular to the second direction;
the sampling module is further configured to sample a plurality of pixels at intervals in the first direction and the second direction respectively to obtain the second image data.
In one embodiment, the sampling module further comprises:
a first determination sub-module configured to determine an output frequency at which the image sensor outputs the first image data;
a second determination submodule configured to determine the sampling frequency as a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1;
a sampling sub-module configured to sample a plurality of pixels at intervals in the second direction according to a sampling frequency.
In one embodiment, the electronic device further comprises:
a transmission module configured to acquire the first image data, transmit the first image data to the image signal processor, and output the first image data to a memory when the first data amount is less than or equal to the throughput.
FIG. 7 is a block diagram of an electronic device shown in accordance with an example embodiment. For example, the device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, device 1000 may include one or more of the following components: processing components 1002, memory 1004, power components 1006, multimedia components 1008, audio components 1010, input/output (I/O) interfaces 1012, sensor components 1014, and communication components 1016.
The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1002 may include one or more processors 1020 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
The memory 1004 is configured to store various types of data to support operation at the device 1000. Examples of such data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1004 may be implemented by any type or combination of volatile or non-volatile memory devices, 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 memory, flash memory, magnetic or optical disks.
Power components 1006 provide power to the various components of device 1000. Power components 1006 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 1000.
The multimedia component 1008 includes a screen that provides an output interface between the device 1000 and a 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 touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1000 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1010 is configured to output and/or input audio signals. For example, the audio component 1010 may include a Microphone (MIC) configured to receive external audio signals when the device 1000 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1004 or transmitted via the communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
I/O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the device 1000. For example, the sensor assembly 1014 may detect an open/closed state of the device 1000, the relative positioning of components, such as a display and keypad of the device 1000, the sensor assembly 1014 may also detect a change in position of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, orientation or acceleration/deceleration of the device 1000, and a change in temperature of the device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The 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, the sensor assembly 1014 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communications component 1016 is configured to facilitate communications between device 1000 and other devices in a wired or wireless manner. The device 1000 may access a wireless network based on a communication standard, such as WiFi,2G or 3g,4g lte,5g NR, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1016 further includes a Near Field Communication (NFC) module to facilitate short-range communications. 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.
In an exemplary embodiment, the 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 1004 comprising instructions, executable by the processor 1020 of the device 1000 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The specific manner in which the processor performs the operations with respect to the apparatus in the above-described embodiment has been described in detail in relation to the embodiment of the method, and will not be elaborated upon here.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. An image processing method, characterized in that the method comprises:
under the condition that a closing signal of an image sensor is detected, outputting first image data acquired by the image sensor to a memory, and carrying out data integrity verification on the first image data;
if the first image data passes the data integrity check, controlling an image signal processor to read the first image data from the memory;
and if the first image data does not pass the data integrity check, controlling the memory to delete the first image data.
2. The method of claim 1, wherein before the performing the data integrity check on the first image data, further comprising:
buffering a frame header and/or a frame trailer of the first image data; the frame head and/or the frame tail comprise a check value;
the performing data integrity check on the first image data includes:
and carrying out data integrity check on the first image data according to the frame head and/or the frame tail.
3. The method of claim 1, further comprising:
acquiring a first data volume transmitted by the image sensor in unit time when the first image data is output;
when the first data volume is larger than the throughput of the image signal processor, performing down-sampling processing on the first image data to obtain second image data, and outputting the second image data to the image signal processor; wherein a second data amount transmitted per unit time when the second image data is output to the image signal processor is less than or equal to the throughput.
4. The method of claim 3, wherein said obtaining a first amount of data transferred by the image sensor per unit time when outputting the first image data comprises:
acquiring the resolution of each frame of image and the frame rate of the image sensor when outputting the first image data;
and acquiring the first data volume according to the resolution and the frame rate.
5. The method according to claim 3, wherein the first image data includes a plurality of pixels arranged in an array;
performing down-sampling processing on the first image data to obtain second image data, including:
and for the first image data of each frame of image output by the image sensor, performing interval sampling on a plurality of pixels to obtain the second image data.
6. The method of claim 5, wherein the plurality of pixels are arrayed along a first direction and a second direction, the first direction being perpendicular to the second direction;
the sampling at intervals is performed on a plurality of pixels to obtain the second image data, and the sampling comprises:
and carrying out interval sampling on a plurality of pixels in the first direction and the second direction respectively to obtain the second image data.
7. The method of claim 6, wherein sampling a plurality of pixels at intervals in the second direction comprises:
determining an output frequency at which the image sensor outputs the first image data;
determining a sampling frequency as a predetermined multiple of the output frequency; the predetermined multiple is a positive number less than 1;
and sampling a plurality of pixels at intervals in the second direction according to the sampling frequency.
8. The method of claim 3,
and when the first data volume is less than or equal to the throughput, acquiring 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 verification module is configured to output first image data acquired by an image sensor to a memory and perform data integrity verification on the first image data under the condition that a closing signal of the image sensor is detected;
a reading module configured to control the image signal processor to read the first image data from the memory if the first image data passes a data integrity check;
a deletion module configured to control the memory to delete the first image data if the first image data fails a data integrity check.
10. The electronic device of claim 9, further comprising:
the acquisition module is configured to acquire a first data volume transmitted by the image sensor in unit time when the image sensor outputs the first image data after the image sensor is started;
the sampling module is further configured to 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 under the condition that the first data volume is larger than the throughput of the image signal processor; wherein a second data amount transmitted per unit time when the second image data is output to the image signal processor is less than or equal to the throughput.
11. An electronic device comprising a processor and a memory; the memory for storing a computer program; the processor, 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, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
CN202110604797.6A 2021-05-31 2021-05-31 Image processing method and electronic device Pending CN115484357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110604797.6A CN115484357A (en) 2021-05-31 2021-05-31 Image processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110604797.6A CN115484357A (en) 2021-05-31 2021-05-31 Image processing method and electronic device

Publications (1)

Publication Number Publication Date
CN115484357A true CN115484357A (en) 2022-12-16

Family

ID=84419255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110604797.6A Pending CN115484357A (en) 2021-05-31 2021-05-31 Image processing method and electronic device

Country Status (1)

Country Link
CN (1) CN115484357A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202535461U (en) * 2012-01-11 2012-11-14 蒋牛 Digital image shooting device with time-space information and original identification
CN107807891A (en) * 2017-09-30 2018-03-16 河北卓智电子技术有限公司 Information collecting method and terminal device
CN108600050A (en) * 2018-04-26 2018-09-28 北京比特大陆科技有限公司 Order transmission method, device, computer equipment and readable storage medium storing program for executing
CN109138997A (en) * 2018-08-31 2019-01-04 湖南率为控制科技有限公司 A kind of multipolar array acoustic tool device
CN109714415A (en) * 2018-12-26 2019-05-03 北京小米移动软件有限公司 Data processing method and device
CN111343375A (en) * 2018-12-19 2020-06-26 北京小米移动软件有限公司 Image signal processing method and device, electronic device and storage medium
CN111343386A (en) * 2018-12-19 2020-06-26 北京小米移动软件有限公司 Image signal processing method and device, electronic device and storage medium
CN111698414A (en) * 2019-03-14 2020-09-22 北京小米移动软件有限公司 Image signal processing method and device, electronic device and readable storage medium
US20210099665A1 (en) * 2018-06-12 2021-04-01 Carl Zeiss Ag Method, apparatus, and system for processing digital images

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202535461U (en) * 2012-01-11 2012-11-14 蒋牛 Digital image shooting device with time-space information and original identification
CN107807891A (en) * 2017-09-30 2018-03-16 河北卓智电子技术有限公司 Information collecting method and terminal device
CN108600050A (en) * 2018-04-26 2018-09-28 北京比特大陆科技有限公司 Order transmission method, device, computer equipment and readable storage medium storing program for executing
US20210099665A1 (en) * 2018-06-12 2021-04-01 Carl Zeiss Ag Method, apparatus, and system for processing digital images
CN109138997A (en) * 2018-08-31 2019-01-04 湖南率为控制科技有限公司 A kind of multipolar array acoustic tool device
CN111343375A (en) * 2018-12-19 2020-06-26 北京小米移动软件有限公司 Image signal processing method and device, electronic device and storage medium
CN111343386A (en) * 2018-12-19 2020-06-26 北京小米移动软件有限公司 Image signal processing method and device, electronic device and storage medium
CN109714415A (en) * 2018-12-26 2019-05-03 北京小米移动软件有限公司 Data processing method and device
CN111698414A (en) * 2019-03-14 2020-09-22 北京小米移动软件有限公司 Image signal processing method and device, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
US9674395B2 (en) Methods and apparatuses for generating photograph
US9591256B2 (en) Methods and devices for video communication
US9930156B2 (en) Method and apparatus for recommending contact information
EP3182716A1 (en) Method and device for video display
CN107025419B (en) Fingerprint template inputting method and device
US20160381276A1 (en) Method and user terminal for capturing video frame
CN106657780B (en) Image preview method and device
KR101906748B1 (en) Iris image acquisition method and apparatus, and iris recognition device
CN112114765A (en) Screen projection method and device and storage medium
EP2986020A1 (en) Method and apparatus for adjusting video quality based on network environment
CN107105311B (en) Live broadcasting method and device
US10085050B2 (en) Method and apparatus for adjusting video quality based on network environment
CN107704489B (en) Processing method and device for read-write timeout and computer readable storage medium
US10187498B2 (en) Method and apparatus for setting waiting time duration
US10671827B2 (en) Method and device for fingerprint verification
CN115484357A (en) Image processing method and electronic device
US10193991B2 (en) Methods and apparatuses for providing information of video capture device
CN111698414B (en) Image signal processing method and device, electronic device and readable storage medium
CN110874829B (en) Image processing method and device, electronic device and storage medium
CN111356001A (en) Video display area acquisition method and video picture display method and device
CN115953422B (en) Edge detection method, device and medium
CN115065643B (en) Network link congestion detection method, device, electronic equipment and storage medium
CN114339015B (en) Photographing processing method, photographing processing device and storage medium
CN109862252B (en) Image shooting method and device
CN110876013B (en) Method and device for determining image resolution, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination