Image processing chip detection method and device, and electronic equipment
By independently setting up MIPI data processing unit and preview image processing unit in the image processing chip, targeted recovery in case of anomalies is achieved, solving the problem of difficulty in recovering from anomalies in the preview channel or MIPI transmission channel, and improving image processing efficiency.
Patent Information
- Application Number
- CN202411344811.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In image processing chips, it is difficult to recover when the preview channel or MIPI transmission channel is abnormal, which affects the efficiency of preview image processing.
The units in the image processing chip that process and transmit MIPI data and those that process preview images are set up independently, and detection and recovery are performed separately to avoid the need for overall algorithm recovery.
When a unit malfunctions, it can specifically recover the malfunctioning unit without affecting the normal processing of another unit, thereby improving image processing efficiency and avoiding resource waste.
Smart Images

Figure CN119211709B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing, and specifically relates to a method, apparatus and electronic device for detecting an image processing chip. Background Technology
[0002] Mobile imaging has become a key research area for major manufacturers in recent years, focusing on technological innovation and improving user experience. It typically utilizes a Neural-network Processing Unit (NPU) on the chip to process image data, accelerating photo taking and previewing. However, in the engineering implementation of NPU-equipped chips, the preview pipeline is often placed within the Mobile Industry Processor Interface (MIPI) transmission channel. This can lead to difficulties in recovering from anomalies in the preview channel or MIPI transmission channel, thus affecting the processing of preview images. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, and electronic device for detecting image processing chips, so as to solve the problem of difficulty in recovery when anomalies occur in the preview channel or MIPI transmission channel.
[0004] To solve the above-mentioned technical problems, this application is implemented as follows:
[0005] In a first aspect, embodiments of this application provide a method for detecting an image processing chip, applied to an image processing chip, the image processing chip comprising: a first processing unit and a second processing unit, the first processing unit being used to process and / or transmit Mobile Industry Processor Interface (MIPI) data of a preview image, and the second processing unit being used to process the preview image;
[0006] The method includes:
[0007] The first processing unit and / or the second processing unit are tested to obtain the test results;
[0008] Based on the detection results, the abnormal first processing unit and / or second processing unit are restored.
[0009] Secondly, embodiments of this application provide a detection device for an image processing chip, applied to an image processing chip, the image processing chip including: a first processing unit and a second processing unit, the first processing unit being used to process and / or transmit MIPI data of a preview image, and the second processing unit being used to process the preview image;
[0010] The device includes:
[0011] The detection module is used to detect the first processing unit and / or the second processing unit to obtain detection results;
[0012] The recovery processing module is used to recover the abnormal first processing unit and / or second processing unit based on the detection results.
[0013] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] Fifthly, embodiments of this application also provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0016] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0017] In the embodiments of this application, the unit for processing and / or transmitting MIPI data and the unit for processing preview images in the image processing chip are set independently and do not interfere with each other. When an abnormality is detected in a certain unit, the abnormal unit can be restored in a targeted manner without having to restore the entire algorithm of the image processing chip. This ensures that when one unit is abnormal, the other unit can process data normally, avoids resource waste, and improves image processing efficiency. Attached Figure Description
[0018] Figure 1 This is a schematic flowchart of the detection method for the image processing chip according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the processing channel inside the image processing chip according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the structure of the detection device for the image processing chip according to an embodiment of this application;
[0021] Figure 4 This is one of the structural schematic diagrams of the electronic device according to an embodiment of this application;
[0022] Figure 5 This is a second schematic diagram of the structure of the electronic device according to an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0025] The detection method, apparatus, and electronic device for image processing chips provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0026] like Figure 1 As shown, this application provides a detection method for an image processing chip, which is applied to an image processing chip. The image processing chip includes: a first processing unit and a second processing unit. The first processing unit is used to process and / or transmit Mobile Industry Processor Interface (MIPI) data of a preview image, and the second processing unit is used to process the preview image.
[0027] The method includes:
[0028] Step 101: Detect the first processing unit and / or the second processing unit to obtain detection results;
[0029] Step 102: Based on the detection results, restore the abnormal first processing unit and / or second processing unit.
[0030] In this embodiment, the electronic device may include an application processor (AP) and an image processing chip. The AP is the main chip of the electronic device, which can process the device's data tasks, control the user interface, process graphics and audio, and manage network communication. The image processing chip may be an external chip, or it can be understood as a chip added to the electronic device for image processing. The AP and the image processing chip are connected to each other and can transmit data.
[0031] Optionally, the image processing chip may be an external chip equipped with a neural network processing unit (NPU). If an NPU is set in the image processing chip, the NPU can perform image processing.
[0032] A photosensor acquires image data and transmits it to an image processing chip. The image processing chip includes a first processing unit and a second processing unit, which are two independent image processing units used to process different types of image data. The first processing unit can be used to process and / or transmit MIPI data; it can also be understood as processing data that needs to be sent to the access point (AP) via the MIPI protocol. Optionally, the processing is physical layer processing, such as data encoding, modulation, and signal conversion (e.g., converting data into a signal form). It should be noted that the first processing unit may also simply transmit data without processing it, for example, sending the sensor-transmitted data to the AP via an analog bypass. Once the image processing chip transmits the image data from the photosensor to the AP, the user can see a preview image.
[0033] The second processing unit is used to process and cache the preview image. The processing can be understood as the processing of image parameters, such as adjusting the image parameters (e.g., size, color, resolution, etc.) according to user-set parameters or camera-built-in parameters.
[0034] For example Figure 2As shown: The photosensitive sensor represents the camera of the electronic device. After the camera's photosensitive sensor collects data, it transmits the image data line by line to the image processing chip. The image processing chip receives the data through the receive interface (RX). At this point, the data can be processed or transmitted by the first processing unit. The first processing unit includes a digital channel (Digital bypass) and an analog channel (Analog bypass). The image processing chip can choose to process the data through the MIPI port physical layer (PHY). Figure 2 The digital channel in the middle), or without MIPIPHY processing (that is, without MIPIPHY processing). Figure 2 (The analog channel in the middle).
[0035] If MIPIPHY processing is selected, the image data undergoes digital bypass and is then transmitted to the AP via the output interface (Transmit, TX) using the MIPI protocol. Additionally, the image processing chip can selectively use a second processing unit simultaneously to process the preview image and cache the processing results. This second processing unit may include... Figure 2 The preview pipeline in the example. Figure 2 As shown, the channels for processing MIPI data (Digital bypass, Analog bypass) and the preview pipeline are independent channels and do not interfere with each other.
[0036] The image processing chip can monitor the first processing unit and / or the second processing unit respectively, and restore any abnormal processing units. For example, the image processing chip can perform self-tests on the Digital bypass and preview pipeline respectively to determine whether each channel is abnormal, and restore any abnormal channels.
[0037] Optionally, in the embodiments of this application, restoring the processing unit can be understood as restoring the channel, such as restoring the digital bypass or preview pipeline. The restoration refers to determining the cause of the channel anomaly based on the detection results and processing the anomaly to restore it to a normal state. For example, if the preview pipeline is abnormal, and the detection results determine that the anomaly is caused by a processing node malfunction, then that processing node is adjusted; or if the preview pipeline is abnormal, and the detection results determine that the anomaly is caused by interference, then the interference is processed; or if the preview pipeline is abnormal, and the detection results determine that a certain algorithm parameter of the image processing chip is incorrect, then that parameter is corrected. The embodiments of this application do not limit the specific anomaly situations or restoration methods.
[0038] In the embodiments of this application, the unit for processing and / or transmitting MIPI data and the unit for processing preview images in the image processing chip are set independently and do not interfere with each other. When an abnormality is detected in a certain unit, the abnormal unit can be restored in a targeted manner without having to restore the entire algorithm of the image processing chip. This ensures that when one unit is abnormal, the other unit can process data normally, avoids resource waste, and improves image processing efficiency.
[0039] As an optional embodiment, detecting the first processing unit and / or the second processing unit to obtain detection results includes:
[0040] When the first processing unit processes any frame of image, the detection result of the first processing unit is determined based on the first image input to the first processing unit and the second image output by the first processing unit.
[0041] And / or,
[0042] When the second processing unit processes any frame of image, the detection result of the second processing unit is determined based on the processing result of the image by the processing node of the second processing unit.
[0043] In this embodiment, when detecting the processing unit, it is possible to determine whether the processing unit is abnormal based on the image input to the processing unit and the image output by the processing unit. For example, the image processing chip receives image data sent by the photosensitive sensor, processes it through the first processing unit (or it can transmit it without processing), and then sends it to the AP. The image data input to the first processing unit is called the first image, and the data output by the first processing unit is called the second image. It is possible to determine whether the first processing unit is abnormal based on the first image and the second image.
[0044] Alternatively, when detecting a processing unit, the processing unit's abnormality can be determined based on the image processing results of its internal nodes. For example, the second processing unit includes multiple processing nodes, which can be various algorithm nodes used in image processing.
[0045] Optionally, detecting the first processing unit and / or the second processing unit to obtain a detection result further includes:
[0046] If the detection results of the first processing unit and / or the second processing unit for N consecutive frames of images are all abnormal, the first processing unit and / or the second processing unit are determined to be abnormal.
[0047] In this embodiment, when detecting the first processing unit and / or the second processing unit and obtaining the detection results, it can be determined whether the processing unit is abnormal based on the detection results of the processing unit processing N consecutive frames of images. For example, if the detection results of the first processing unit processing N consecutive frames of images are all abnormal, then the first processing unit is determined to be abnormal; if the detection results of the second processing unit processing M consecutive frames of images are all abnormal, then the second processing unit is determined to be abnormal.
[0048] As an optional embodiment, determining the detection result of the first processing unit based on the first image input to the first processing unit and the second image output by the first processing unit includes:
[0049] The detection result of the first processing unit is determined based on the number of rows in the first image and the number of rows in the second image.
[0050] In this embodiment, the first image is the image transmitted from the photosensor to the first processing unit, and the second image is the image output from the first processing unit to the AP. Both the first image and the second image are preset with a fixed number of rows. If the number of rows in the first image is detected to be different from the preset number of rows, it is considered that the timing of the photosensor's image output is abnormal, and the photosensor is abnormal. If the number of rows in the second image is detected to be different from the preset number of rows, it is considered that the timing of the first processing unit's image output is abnormal, and the first processing unit is abnormal.
[0051] Optionally, the method further includes:
[0052] Send the detection result of the first processing unit to the AP;
[0053] The detection result of the first processing unit includes one of the following:
[0054] The first processing unit's image output timing is abnormal, while the sensor's image output timing is normal;
[0055] The first processing unit outputs images at a normal timing, while the sensor outputs images at an abnormal timing.
[0056] The first processing unit has an abnormal image output timing, and the sensor has an abnormal image output timing.
[0057] The first processing unit's image output timing is normal, and the sensor's image output timing is also normal.
[0058] In this embodiment, the image processing chip can send the detection results to the AP. The AP determines how to restore the processing unit based on the detection results. For example, if the AP determines that the first processing unit has an abnormal image output timing based on the detection results, it determines that the first processing unit needs to be restored. If the AP determines that the photosensitive sensor has an abnormal image output timing based on the detection results, it determines that the photosensitive sensor needs to be restored.
[0059] Optionally, based on the detection results, the abnormal first processing unit is restored, including:
[0060] The system receives first control information sent by the AP, which indicates that the first channel in the first processing unit is restored, or the first channel in the first processing unit is switched to the second channel, where the first channel is the channel indicated as abnormal by the detection result.
[0061] The first processing unit is restored based on the first control information.
[0062] In this embodiment, when the AP chip determines that the first processing unit is abnormal, it can send first control information to the image sensor, instructing the image processor to restore the abnormal channel in the first processing unit, or instructing the image processor to switch the abnormal channel in the first processing unit.
[0063] As an optional embodiment, the detection result of the second processing unit is determined based on the processing result of the image by the processing node of the second processing unit, including:
[0064] Obtain the processing result of each processing node in the second processing unit on the image;
[0065] If the processing result of at least one processing node in the second processing unit does not meet the first condition, then the second processing unit is determined to be abnormal.
[0066] The first condition includes at least one of the following:
[0067] The processing result is incomplete;
[0068] The value of the processing result is not within the preset range.
[0069] In this embodiment, when detecting the second processing unit, the system can determine whether the second processing unit is abnormal based on the image processing results of its internal processing nodes. For example, for a preview pipeline, each node in the preview pipeline generates intermediate results. The intermediate results of each node are detected, and if an anomaly is found, such as incomplete output of intermediate results for a certain node or values exceeding the expected range, it indicates that the preview pipeline is abnormal.
[0070] The following example illustrates the implementation process of an image processing chip for detection.
[0071] Example 1: Perform a self-test on the second processing unit, which is the preview pipeline in the image processing chip. The methods for the image processing chip to perform the test include:
[0072] Step 21: The user opens the camera and enters the preview interface. This step is a prerequisite for taking a photo.
[0073] Step 22: Preview the pipeline and process it normally, including processing and caching the preview image.
[0074] In this step, under normal preview mode, the preview pipeline processes the preview image and generates intermediate results.
[0075] Step 23: Preview the pipeline to perform a self-check on each frame of the image and obtain the self-check results.
[0076] In the preview pipeline processing, each node in the pipeline will generate intermediate results. The intermediate results of each node are checked. If an anomaly is found, such as an incomplete output of the intermediate result of a certain node, or the value of the intermediate result exceeds the expected range, it indicates a self-check anomaly.
[0077] Step 24: Read the results of the self-check for each frame of the image.
[0078] For each frame of image, a self-check result is generated, and the self-check result is read for the judgment in step 25.
[0079] Step 25: Determine if there are multiple consecutive frames of self-test anomalies.
[0080] If the self-test for N consecutive frames is abnormal, it means that the preview pipeline cannot recover on its own and recovery needs to be triggered.
[0081] Step 26: Trigger the preview pipeline recovery.
[0082] This step will not affect the processing flow in the first processing unit, that is, it will not affect the Digital bypass or Analog bypass processing flow. The preview pipeline is an independent pipeline and will not affect the first processing unit. After the recovery is triggered, the preview processing will resume normal operation.
[0083] Step 27: The image processing chip restarts the self-test for each frame of image.
[0084] After the preview pipeline is reset, the self-test status is also reset, and the self-test restarts.
[0085] In this example, for Figure 2 The preview pipeline performs a self-check. If an anomaly is found during the self-check, the preview pipeline is automatically reset and restored. This embodiment can perform a relatively independent self-check on the preview pipeline and effectively restore it without affecting the normal preview image.
[0086] Example 2: The image processing chip performs a self-test for digital bypass in the first processing unit, and the detection methods include:
[0087] Step 31: Open the camera and enter preview mode. This step is a prerequisite for taking the photo.
[0088] Step 32: The image sent by the sensor from the digital bypass in the image processing chip is transmitted to the AP.
[0089] Step 33: Image processing chip self-test (Digital bypass). For example, by detecting the number of rows in each frame of image transmitted from the sensor and the number of rows in the image sent by the image processing chip to the AP, it can be determined whether the timing of the sensor's image output is abnormal, and whether the image output of the image processing chip is abnormal.
[0090] Step 34: Send the self-test results of each frame of image to the AP.
[0091] Step 35: AP determines whether there are self-check anomalies in multiple consecutive frames of images.
[0092] Step 36: AP determines the type of self-test anomaly and triggers recovery.
[0093] If the sensor output timing is normal, but the image processing chip output timing is abnormal, the AP will actively initiate the recovery of the digital bypass of the image processing chip, or trigger the image processing chip to switch to the Analog bypass path.
[0094] If there is an abnormality in the image output from the sensor, but the timing of the image output from the image processing chip is normal, the AP will actively initiate sensor recovery.
[0095] Step 37: The image processing chip restarts its self-test every frame. After performing recovery, the self-test status is also reset, and the self-test restarts.
[0096] This embodiment performs a self-check on the digital bypass, enabling timely recovery in case of image preview anomalies. For example, if the preview freezes or lags, the image processing chip checks the number of rows of images transmitted from the sensor and the number of rows of images sent out, allowing the AP to determine the source of the anomaly. This helps determine whether the anomaly is due to sensor image output failure or a problem with the image processing chip's digital bypass, thus enabling the execution of an efficient recovery mechanism.
[0097] In the embodiments of this application, the unit for processing and / or transmitting MIPI data and the unit for processing preview images in the image processing chip are set independently and do not interfere with each other. When an abnormality is detected in a certain unit, the abnormal unit can be restored in a targeted manner without having to restore the entire algorithm of the image processing chip. This ensures that when one unit is abnormal, the other unit can process data normally, avoids resource waste, and improves image processing efficiency.
[0098] Embodiments of this application also provide a method for detecting an image processing chip, applied to an application processing unit (AP), the method comprising:
[0099] The image processing chip sends a detection result from a first processing unit, which is used to process and / or transmit MIPI data of the preview image.
[0100] Based on the detection result of the first processing unit, first control information is sent to the image processing chip, and / or second control information is sent to the sensor;
[0101] Wherein, the first control information is used to indicate: to restore the first channel in the first processing unit, or to switch the first channel in the first processing unit to the second channel, wherein the first channel is the channel indicated as abnormal by the detection result;
[0102] The second control information is used to instruct: Restore the sensor.
[0103] Optionally, the method further includes:
[0104] First control information and / or second control information are generated based on the detection results of the first processing unit;
[0105] Optionally, the detection result of the first processing unit includes one of the following:
[0106] The first processing unit's image output timing is abnormal, while the sensor's image output timing is normal;
[0107] The first processing unit's image output timing is normal, but the sensor's image output timing is abnormal;
[0108] The first processing unit's image output timing is abnormal, and the sensor's image output timing is also abnormal;
[0109] The first processing unit's image output timing is normal, and the sensor's image output timing is also normal.
[0110] In this embodiment, the image processing chip performs a self-test and can send the test results to the AP. The AP determines how to restore the processing unit based on the test results. For example, if the AP determines that the first processing unit has an abnormal image output timing based on the test results, it determines that the first processing unit needs to be restored. If the AP chip determines that the photosensitive sensor has an abnormal image output timing based on the test results, it determines that the photosensitive sensor needs to be restored.
[0111] When the AP determines that the first processing unit is abnormal, it can send first control information to the image sensor, instructing the image processor to restore the abnormal channel in the first processing unit, or instructing the image processor to switch the abnormal channel in the first processing unit.
[0112] like Figure 3 As shown, this application embodiment also provides an image processing chip detection device 300, applied to an image processing chip, the image processing chip including: a first processing unit and a second processing unit, the first processing unit being used to process and / or transmit MIPI data of a preview image, and the second processing unit being used to process the preview image;
[0113] The device includes:
[0114] Detection module 310 is used to detect the first processing unit and / or the second processing unit to obtain detection results;
[0115] The recovery processing module 320 is used to recover the abnormal first processing unit and / or second processing unit based on the detection results.
[0116] Optionally, the detection module is specifically used for:
[0117] When the first processing unit processes any frame of image, the detection result of the first processing unit is determined based on the first image input to the first processing unit and the second image output by the first processing unit.
[0118] And / or,
[0119] When the second processing unit processes any frame of image, the detection result of the second processing unit is determined based on the processing result of the image by the processing node of the second processing unit.
[0120] Optionally, the detection module is specifically used for:
[0121] The detection result of the first processing unit is determined based on the number of rows in the first image and the number of rows in the second image.
[0122] Optionally, the device further includes:
[0123] The first sending module is used to send the detection result of the first processing unit to the AP;
[0124] The detection result of the first processing unit includes one of the following:
[0125] The first processing unit's image output timing is abnormal, while the sensor's image output timing is normal;
[0126] The first processing unit outputs images at a normal timing, while the sensor outputs images at an abnormal timing.
[0127] The first processing unit has an abnormal image output timing, and the sensor has an abnormal image output timing.
[0128] The first processing unit's image output timing is normal, and the sensor's image output timing is also normal.
[0129] Optionally, the recovery processing module is specifically used for:
[0130] The system receives first control information sent by the AP, which indicates that the first channel in the first processing unit is restored, or the first channel in the first processing unit is switched to the second channel, where the first channel is the channel indicated as abnormal by the detection result.
[0131] The first processing unit is restored based on the first control information.
[0132] Optionally, the detection module is specifically used for:
[0133] Obtain the processing result of the image by each processing node in the second processing unit;
[0134] If at least one processing node in the second processing unit fails to meet the first condition in terms of processing result, then the second processing unit is determined to be abnormal.
[0135] The first condition includes at least one of the following:
[0136] The processing result is incomplete;
[0137] The value of the processing result is not within the preset range.
[0138] Optionally, the detection module is further configured to:
[0139] If the detection results of the first processing unit and / or the second processing unit for N consecutive frames of images are all abnormal, the first processing unit and / or the second processing unit are determined to be abnormal.
[0140] In the embodiments of this application, the unit for processing and / or transmitting MIPI data and the unit for processing preview images in the image processing chip are set independently and do not interfere with each other. When an abnormality is detected in a certain unit, the abnormal unit can be restored in a targeted manner without having to restore the entire algorithm of the image processing chip. This ensures that when one unit is abnormal, the other unit can process data normally, avoids resource waste, and improves image processing efficiency.
[0141] The detection device for the image processing chip in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.
[0142] The image processing chip detection device in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system.
[0143] The image processing chip detection device provided in this application embodiment can achieve Figures 1 to 2The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0144] Optional, such as Figure 4 As shown, this application embodiment also provides an electronic device 400, which may include an AP chip and / or an image processing chip. The electronic device includes a processor 401, a memory 402, and a program or instructions stored in the memory 402 and executable on the processor 401. When the program or instructions are executed by the processor 401, they implement the various processes of the detection method embodiment of the image processing chip described above and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0145] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0146] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0147] The electronic device 500 includes, but is not limited to, components such as: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
[0148] Those skilled in the art will understand that the electronic device 500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0149] Wherein, when the electronic device is an image processing chip, the processor 510 is used to: detect the first processing unit and / or the second processing unit to obtain a detection result;
[0150] Based on the detection results, the abnormal first processing unit and / or second processing unit are restored.
[0151] Optionally, the detection module is specifically used for:
[0152] When the first processing unit processes any frame of image, the detection result of the first processing unit is determined based on the first image input to the first processing unit and the second image output by the first processing unit.
[0153] And / or,
[0154] When the second processing unit processes any frame of image, the detection result of the second processing unit is determined based on the processing result of the image by the processing node of the second processing unit.
[0155] Optionally, the detection module is specifically used for:
[0156] The detection result of the first processing unit is determined based on the number of rows in the first image and the number of rows in the second image.
[0157] Optionally, the device further includes:
[0158] The second sending module is used to send the detection result of the first processing unit to the AP;
[0159] The detection result of the first processing unit includes one of the following:
[0160] The first processing unit's image output timing is abnormal, while the sensor's image output timing is normal;
[0161] The first processing unit outputs images at a normal timing, while the sensor outputs images at an abnormal timing.
[0162] The first processing unit has an abnormal image output timing, and the sensor has an abnormal image output timing.
[0163] The first processing unit's image output timing is normal, and the sensor's image output timing is also normal.
[0164] Optionally, the recovery processing module is specifically used for:
[0165] The system receives first control information sent by the AP, which indicates that the first channel in the first processing unit is restored, or the first channel in the first processing unit is switched to the second channel, where the first channel is the channel indicated as abnormal by the detection result.
[0166] The first processing unit is restored based on the first control information.
[0167] Optionally, the detection module is specifically used for:
[0168] Obtain the processing result of each processing node in the second processing unit on the image;
[0169] If the processing result of at least one processing node in the second processing unit does not meet the first condition, then the second processing unit is determined to be abnormal.
[0170] The first condition includes at least one of the following:
[0171] The processing result is incomplete;
[0172] The value of the processing result is not within the preset range.
[0173] Optionally, the detection module is specifically used for:
[0174] If the detection results of the first processing unit and / or the second processing unit for N consecutive frames of images are all abnormal, the first processing unit and / or the second processing unit are determined to be abnormal.
[0175] It should be understood that, in this embodiment, the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The GPU 5041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0176] The memory 509 can be used to store software programs and various data. The memory 509 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 509 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0177] Processor 510 may include one or more processing units; optionally, processor 510 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 510.
[0178] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the detection method embodiment of the image processing chip described above and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0179] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0180] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the detection method embodiment of the above image processing chip, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0181] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0182] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the detection method embodiment of the image processing chip described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0183] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0184] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
Claims
1. A method of detecting an image processing chip, characterized by, The application is applied to an image processing chip, and the image processing chip comprises a first processing unit and a second processing unit, the first processing unit is used for processing and / or transmitting mobile industry processor interface (MIPI) data of a preview image, and the second processing unit is used for processing the preview image. The method comprises: detecting the first processing unit and / or the second processing unit to obtain a detection result; restoring the abnormal first processing unit and / or the second processing unit according to the detection result.
2. The method of claim 1, wherein, The detection of the first processing unit and / or the second processing unit to obtain a detection result comprises: in the case that the first processing unit processes any frame image, determining the detection result of the first processing unit according to a first image input into the first processing unit and a second image output by the first processing unit; and / or, in the case that the second processing unit processes any frame image, determining the detection result of the second processing unit according to the processing result of the image by a processing node of the second processing unit.
3. The method of claim 2, wherein, The determination of the detection result of the first processing unit according to the first image input into the first processing unit and the second image output by the first processing unit comprises: determining the detection result of the first processing unit according to the number of rows of the first image and the number of rows of the second image.
4. The method according to claim 1 or 3, characterized in that, The method further comprises: sending the detection result of the first processing unit to an application processor (AP); wherein the detection result of the first processing unit comprises one of: the first processing unit has abnormal output timing, and the sensor has normal output timing; the first processing unit has normal output timing, and the sensor has abnormal output timing; the first processing unit has abnormal output timing, and the sensor has abnormal output timing; the first processing unit has normal output timing, and the sensor has normal output timing.
5. The method according to claim 1 or 4, characterized in that, The restoration of the abnormal first processing unit according to the detection result comprises: receiving first control information sent by the AP, the first control information being used for instructing to restore a first channel in the first processing unit or to switch the first channel in the first processing unit to a second channel, the first channel being a channel indicated as abnormal by the detection result; restoring the first processing unit according to the first control information.
6. The method of claim 2, wherein, The determination of the detection result of the second processing unit according to the processing result of the image by the processing node of the second processing unit comprises: obtaining the processing result of the image by each processing node in the second processing unit; if the processing result corresponding to at least one processing node in the second processing unit does not satisfy a first condition, determining that the second processing unit is abnormal; wherein the first condition comprises at least one of: the processing result is incomplete; the value of the processing result is not in a preset range.
7. The method according to claim 1 or 2, characterized in that, The detection of the first processing unit and / or the second processing unit to obtain a detection result further comprises: If the detection results of the first processing unit and / or the second processing unit for N consecutive frames of images are all abnormal, the first processing unit and / or the second processing unit are determined to be abnormal.
8. An inspection apparatus of an image processing chip, characterized by comprising: The image processing chip is used in an image processing chip, which includes a first processing unit and a second processing unit. The first processing unit is used to process and / or transmit MIPI data of a preview image, and the second processing unit is used to process the preview image. The device includes: The detection module is used to detect the first processing unit and / or the second processing unit to obtain detection results; The recovery processing module is used to recover the abnormal first processing unit and / or second processing unit based on the detection results.
9. The apparatus of claim 8, wherein, The detection module is specifically used for: When the first processing unit processes any frame of image, the detection result of the first processing unit is determined based on the first image input to the first processing unit and the second image output by the first processing unit. And / or, When the second processing unit processes any frame of image, the detection result of the second processing unit is determined based on the processing result of the image by the processing node of the second processing unit.
10. An electronic device, comprising: It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the detection method of the image processing chip as described in any one of claims 1-7.
Citation Information
Patent Citations
Image processing circuit and data transmission method
CN114285957A
Image processing circuit, method and device, electronic equipment and chip
CN114285959A