Testing System and Methods for Image Processing Algorithms
By automatically comparing the image processing results of hardware and software, the problem of inconsistency between hardware and software results in integrated circuit development is solved, ensuring the stability and consistency of image processing and simplifying the process of discovering design flaws.
Patent Information
- Application Number
- CN202111200395.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-02-08
- Filing Date
- 2021-10-14
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-10-14
AI Technical Summary
In the process of integrated circuit development, the results of image processing algorithms implemented in hardware are often inconsistent with the results of software simulation, making it difficult to detect design flaws, difficult to compare manually, and unable to guarantee the consistency between the image results output by the hardware device and the expectations.
Design a testing system and method that provides original images and parameter settings through a control unit, executes the same image processing program in hardware and software using an image processing device and a testing device respectively, and automatically compares the pixel differences of the processed images to ensure the consistency of the hardware and software results.
It achieves automated image processing result comparison, ensuring that the image results output by the hardware device are consistent with those of the software device, improving design quality and stability, and simplifying the debugging process.
Smart Images

Figure CN114943263B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a testing system and a testing method, and more particularly to a testing system and a testing method for an image processing algorithm that can test the executed algorithm and the parameters used. Background Technology
[0002] In the development of various integrated circuits (ICs), developers typically first design an algorithm that achieves the required functionality, and then simulate the algorithm on a computer using specific software (such as C language or MATLAB) to obtain the effect after the algorithm is executed. Once it is confirmed that the effect of the algorithm meets the requirements, the developers then hand the algorithm over to the IC designers, who then implement the same algorithm on specific hardware.
[0003] However, IC designers may encounter design problems when designing hardware-executable algorithms. For example, due to limitations of the hardware itself (e.g., accuracy) or design considerations (e.g., memory capacity), the hardware may produce different results than the software simulation after implementing the algorithm. Taking image processing algorithms as an example, hardware and software may produce two images with pixel differences after performing image processing on the same image using the same algorithm.
[0004] Generally, the hardware implementation results must match the software simulation results to confirm that the IC design is without problems. Taking image processing as an example, related technologies often involve hardware and software using the same algorithm to process the same image and output two processed images, then comparing whether these two processed images are consistent.
[0005] The comparison process is primarily performed during the design simulation phase of IC design. Specifically, designers typically use a standard image to compare the results of the simulation using the original software with the results implemented using hardware, rather than comparing a large number of actual images after productization. Therefore, it is often impossible to accurately identify flaws in the IC design process, leading to situations where the image processing hardware fails to achieve the expected results after productization.
[0006] Furthermore, a product (such as an image processing IC) typically contains multiple algorithms. If images are compared manually, only the final output image can be compared. When differences are found between the hardware output image and the software output image after comparison, it is impossible to determine which algorithm is causing the problem, making debugging extremely difficult.
[0007] In view of the above problems, the present invention proposes a test system and test method that can automatically compare hardware output images and software output images to test the algorithm used. Summary of the Invention
[0008] The main objective of this invention is to provide a testing system and method for image processing algorithms, which can automatically provide the same image and algorithm parameters to hardware and software. After the hardware and software perform the same image processing on the same image, the processed images are automatically compared to determine whether there are differences, thereby confirming whether the image parameters are suitable for the hardware.
[0009] To achieve the above objectives, the testing system of the present invention includes:
[0010] A control unit provides an original image and parameter settings;
[0011] An image processing device is connected to the control unit and obtains the original image and the parameter setting value;
[0012] Image processing hardware, connected to and driven by the image processing device, performs a first image processing program on the original image based on the parameter settings and generates a hardware-processed image; and
[0013] A testing device is connected to the control unit and the image processing hardware. It obtains the processed image from the image processing hardware and obtains the original image and the parameter setting value from the control unit or the image processing hardware.
[0014] The testing device executes a simulation software and a testing software. The simulation software performs a second image processing program on the original image based on the parameter settings and generates a software-processed image. The testing software performs a comparison program on the hardware-processed image and the software-processed image and generates a comparison result. The second image processing program is the same as the first image processing program. The comparison result shows a one-pixel difference between the hardware-processed image and the software-processed image.
[0015] As described above, the image processing hardware is a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), or a Graphics Processing Unit (GPU).
[0016] As described above, the image processing device executes a first operating system, while the testing device executes a second operating system different from the first operating system.
[0017] As mentioned above, the first operating system is a Linux operating system, and the second operating system is a Windows operating system.
[0018] As described above, the testing device is a cloud server, and the cloud server is wirelessly connected to the control unit and the image processing device via a network.
[0019] As described above, the image processing device has a first transmission unit, the testing device has a second transmission unit, the image processing hardware transmits the hardware-processed image to the testing device via the first transmission unit of the image processing device, and the testing device receives the hardware-processed image via the second transmission unit.
[0020] As described above, the control unit projects the original image onto a first position on a desktop of the first operating system, the image processing hardware is driven to capture the original image from the first position, the image processing device includes a first processor, the first processor projects the hardware-processed image onto a second position on the desktop that does not overlap with the first position, and the first processor captures the desktop and transmits the desktop and the parameter setting value to the test device.
[0021] As described above, the control unit stores the original image and the parameter setting value in a designated folder in the first operating system. The image processing hardware is driven to read the original image from the designated folder and store the hardware-processed image in the designated folder. The image processing device includes a first processor, which transmits all the data in the designated folder to the test device.
[0022] As described above, the first image processing program and the second image processing program are at least one of an image preprocessing program, a de-bayering program, a gamma correction program, a color correction program, an edge enhancement program, a scaling program, a dithering program, and an image post-processing program.
[0023] As described above, the image processing hardware and the simulation software sequentially execute the image preprocessing program, the de-mosaic processing program, the color curve correction program, the color correction program, the scaling program, and the color dithering program. The test software executes the comparison program on the hardware-processed image and the software-processed image generated after each of the processing programs, and generates the corresponding comparison results.
[0024] As described above, the image processing apparatus includes:
[0025] A human-machine interface that accepts external operations to import the original image and set the parameter settings; and
[0026] A sensing unit senses an external environment to generate the original image.
[0027] To achieve the above objectives, the testing method of the present invention is applied to a testing system having an image processing apparatus for controlling a first image processing program and a testing apparatus for controlling a second image processing program, and includes the following steps:
[0028] a) Obtain an original image and a parameter setting value;
[0029] b) An image processing hardware is driven by the image processing device to execute the first image processing program on the original image based on the parameter setting value and generate a hardware-processed image.
[0030] c) The testing device acquires the image processed by the image processing hardware;
[0031] d) The testing device executes simulation software that performs the second image processing procedure on the original image based on the parameter settings and generates a software-processed image, wherein the second image processing procedure is the same as the first image processing procedure; and
[0032] e) The testing device executes testing software, which performs a comparison program on the hardware-processed image and the software-processed image and generates a comparison result, wherein the comparison result displays a one-pixel difference between the hardware-processed image and the software-processed image.
[0033] As described above, the image processing hardware is a field-programmable gate array, an application-specific integrated circuit, or a graphics processor. The image processing device executes a first operating system, and the test device executes a second operating system different from the first operating system.
[0034] As described above, step c involves the image processing device transmitting the hardware-processed image to the testing device via a first transmission unit, and the testing device receiving the hardware-processed image via a second transmission unit.
[0035] As described above, step a is followed by step a1): the control unit projects the original image onto a first location on a desktop of the first operating system; step b) is driven by the image processing hardware to capture the original image from the first location; and step b is followed by:
[0036] b1) The image processing hardware transmits the hardware-processed image to a first processor of the image processing device.
[0037] b2) The first processor projects the hardware-processed image onto a second position on the desktop that does not overlap with the first position; and
[0038] b3) The first processor captures the desktop and transmits the desktop and the parameter settings to the test device.
[0039] As described above, step a) is followed by step a1): the control unit stores the original image and the parameter settings in a designated folder in the first operating system; step b) is driven by the image processing hardware to read the original image from the designated folder, and step b) is followed by:
[0040] b4) The image processing hardware stores the hardware-processed image into the designated folder; and
[0041] b5) A first processor of the image processing device transmits all the data in the designated folder to the test device.
[0042] As described above, the first image processing program and the second image processing program are at least one of an image preprocessing program, a de-mosaic processing program, a color curve correction processing program, a color correction processing program, an edge enhancement processing program, a scaling processing program, a color dithering processing program, and an image postprocessing program.
[0043] As described above, step b) and step d) sequentially execute the image preprocessing procedure, the de-mosaic processing procedure, the color curve correction procedure, the color correction procedure, the scaling procedure, and the color dithering procedure. Step e) executes the comparison procedure on the hardware-processed image and the software-processed image generated after each of the processing procedures, and generates the corresponding comparison results.
[0044] As described above, step a) is either an external operation received by the human-machine interface of the image processing device to import the original image, or a sensing unit of the image processing device senses an external environment to generate the original image.
[0045] Compared to related technologies, the technical advantage of this invention lies in the fact that the system automatically provides the image to be processed and the algorithm parameters to be used, thereby maintaining consistency between the images processed by the hardware algorithm and the software algorithm, as well as the parameter values used. Furthermore, the system can automatically compare the pixel differences between the hardware-processed image and the software-processed image to determine if there are any problems with the algorithm or parameters used. This ensures the consistency between the image results generated by the hardware device and the image results generated by the software device, thereby ensuring the stability of the device output. Attached Figure Description
[0046] Figure 1 This is a first specific embodiment of the block diagram of the testing system of the present invention;
[0047] Figure 2 This is a first specific embodiment of the test method flowchart of the present invention;
[0048] Figure 3 This is a second specific embodiment of the block diagram of the testing system of the present invention;
[0049] Figure 4 This is a third specific embodiment of the block diagram of the testing system of the present invention;
[0050] Figure 5 This is a first specific embodiment of the test system of the present invention;
[0051] Figure 6 This is a second specific embodiment of the test method flowchart of the present invention;
[0052] Figure 7 This is a third specific embodiment of the test method flowchart of the present invention;
[0053] Figure 8 This is a first specific embodiment of the desktop screenshot diagram of the present invention;
[0054] Figure 9a A first specific embodiment of the first image processing flowchart of the present invention;
[0055] Figure 9b This is a first specific embodiment of the second image processing flowchart of the present invention;
[0056] Figure 10 This is a first specific embodiment of the lookup table update flowchart of the present invention;
[0057] Figure 11 This is a first specific embodiment of the lookup table update diagram of the present invention.
[0058] In the attached figures, the following labels are used:
[0059] 1…Test system;
[0060] 10…Control unit;
[0061] 11…Image processing device;
[0062] 111…the first operating system;
[0063] 112…Image processing hardware;
[0064] 12…testing apparatus;
[0065] 121…Second operating system;
[0066] 122…Simulation software;
[0067] 123… test software;
[0068] 13… storage units;
[0069] 131…Original image;
[0070] 132… Parameter setting value;
[0071] 14…Transmission Unit;
[0072] 15…alignment units;
[0073] 16… Output unit;
[0074] 2…Image processing device;
[0075] 21…First processor;
[0076] 22…Human-machine interface;
[0077] 23…sensing units;
[0078] 24…First storage unit;
[0079] 241…Original image;
[0080] 242… Parameter setting value;
[0081] 243…Image after hardware processing;
[0082] 25…Image processing hardware;
[0083] 251… First Algorithm;
[0084] 26…First transmission unit;
[0085] 27…First display unit;
[0086] 3…testing apparatus;
[0087] 31…Second processor;
[0088] 32…Second transmission unit;
[0089] 33…Second storage unit;
[0090] 331…Simulation software;
[0091] 332…Second Algorithm;
[0092] 34…alignment unit;
[0093] 35…Second display unit;
[0094] 41…Desktop;
[0095] 42…First position;
[0096] 43…Second position;
[0097] 5…Image processing unit;
[0098] 61…First lookup table;
[0099] 62…Second lookup table;
[0100] C1…First channel;
[0101] C2…Second channel;
[0102] Test steps for S10~S24, S30~S40, S50~S61…
[0103] S70~S88…Image processing steps;
[0104] S90~S96… Update steps. Detailed Implementation
[0105] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0106] See Figure 1 This is a first specific embodiment of the block diagram of the testing system of the present invention. For example... Figure 1As shown, this invention discloses a testing system for image processing algorithms (hereinafter referred to as Testing System 1 in the specification). Testing System 1 includes a control unit 10, an image processing device 11, and a testing device 12. The image processing device 11 drives specific hardware to perform image processing on a target image and generate a hardware-processed image. The testing device 12 executes specific software to perform the same image processing on the same target image and generate a software-processed image. One of the technical advantages of this invention is that Testing System 1 can automatically provide the target image to be processed and the parameters used in the image processing algorithm, and automatically compare the generated hardware-processed image and the software-processed image.
[0107] Image processing device 11 can execute a first operating system 111 and is connected to image processing hardware 112. Through the first operating system 111, image processing device 11 can drive image processing hardware 112 to perform image processing algorithms on a target image and generate a hardware-processed image. Testing device 12 can execute a second operating system 121 and execute simulation software 122 under the second operating system 121. Through simulation software 122, testing device 12 can perform the same image processing algorithms on the target image via software simulation and generate a software-processed image. Furthermore, by executing testing software 123, testing device 12 can also compare the hardware-processed image and the software-processed image.
[0108] In one embodiment, the first operating system 111 executed by the image processing device 11 is different from the second operating system 121 executed by the testing device 12. For example, the first operating system 111 may be a Linux operating system that is easy to configure and control the image processing hardware 112, and the second operating system 121 may be a Windows operating system that is easy to execute the simulation software 122 and the testing software 123. The above is only a specific embodiment example of the present invention, but is not limited thereto.
[0109] In one embodiment, the test system 1 may be, for example, a computer, a server, or an electronic device with special specifications. In this embodiment, the control unit 10 may be a processor, a central processing unit (CPU), a microcontroller (MCU), a system on chip (SoC), etc. The image processing device 11 and the test device 12 may be hardware components physically connected to the control unit 10, or software modules implemented by the control unit 10 after executing computer-readable program code, without limitation.
[0110] In another embodiment, the control unit 10 may be a computer, a server, or an electronic device with special specifications, and is connected to the image processing device 11 and the testing device 12. In this embodiment, the image processing device 11 and the testing device 12 may be hardware devices (e.g., computers, servers, or other electronic devices), located in the same or different locations as the control unit 10, and connected via wired or wireless means.
[0111] In another embodiment, the image processing apparatus 11 and the testing apparatus 12 may be hardware devices (e.g., computers, servers or other electronic devices), and the control unit 10 may be implemented by the processor in the image processing apparatus 11 or the testing apparatus 12.
[0112] The above are only some specific examples of the present invention, but are not limited thereto.
[0113] Please also refer to Figure 2 This is a first specific embodiment of the test method flowchart of the present invention. Figure 2 The present invention discloses a test method for the image processing algorithm (hereinafter referred to as the test method in the specification), which can be mainly applied to, for example... Figure 1 In the test system 1 shown, but not in the test system 1 Figure 1 The test system shown is limited to 1. The following will combine... Figure 1 and Figure 2 The test system 1 and test method of the present invention will be described in detail.
[0114] like Figure 2 As shown, the test system 1 of the present invention first obtains the original image to be processed and the parameter settings used by the image processing algorithm (step S10). Then, the control unit 10 provides the original image and the parameter settings to the image processing device 11 and the test device 12 respectively (step S12).
[0115] In this embodiment, the image processing device 11 controls the first image processing program, and the testing device 12 controls the second image processing program. Specifically, the first image processing program refers to a program in which specified hardware executes a specified algorithm to process the original image; the second image processing program refers to a program in which specified software simulates the same algorithm to process the original image. In other words, the first image processing program and the second image processing program execute the same algorithm and process the same image, the difference being that the first image processing program is executed by hardware, while the second image processing program is implemented by software.
[0116] After step S12, the image processing device 11 obtains the original image and parameter settings, and drives the connected image processing hardware 112, so that the image processing hardware 113 executes the first image processing program on the original image based on the parameter settings, and generates a hardware-processed image (step S14). After step S14, the image processing hardware 112 outputs the generated hardware-processed image (step S16).
[0117] The image processing hardware 112 may be, for example, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), or a Graphics Processing Unit (GPU), without limitation. In step S12, the image processing device 11 mainly opens the engineering mode of the first operating system 111 automatically or manually through the processor, for example, by opening the command window under the Linux operating system. By reading parameter settings and entering execution commands in engineering mode, the image processing device 11 can drive the image processing hardware 112 to execute the first image processing program.
[0118] The parameter settings can be, for example, a JSON file. The control unit 10 can store the parameter settings in a designated folder in the first operating system 111 so that the image processing hardware 112 can read them. Furthermore, the content of the parameter settings corresponds to the algorithm executed by the first image processing program.
[0119] In one embodiment, the first image processing program may be, for example, at least one of image preprocessing, de-bayering, gamma correction, color correction, edge enhancement, scaling, dithering, and image post-processing, but is not limited thereto.
[0120] If the first image processing program is a scaling program, the parameter setting value can be, for example, a scaling factor. If the first image processing program is an image preprocessing program, the parameter setting value can be, for example, a filter mask. If the first image processing program is a color curve correction program, the parameter setting value can be, for example, a correction table. Furthermore, if the algorithm to be executed by the first image processing program requires the use of a lookup table, the parameter setting value can be, for example, a lookup table required by the algorithm.
[0121] The above are only some specific examples of the present invention, but are not limited thereto.
[0122] Similarly, after step S12, the testing device 12 acquires the original image and parameter settings, and executes specific software to perform a second image processing procedure on the original image based on the parameter settings, and generates a software-processed image (step S18). After step S18, the testing device 12 can output the software-processed image (step S20).
[0123] In one embodiment, the testing device 12 executes the simulation software 122 in step S18. The simulation software 122 performs a second image processing program on the original image based on the parameter settings and generates a software-processed image.
[0124] As mentioned above, the algorithm executed by the simulation software 122 in the second image processing program is the same as the algorithm executed by the image processing hardware 112 in the first image processing program. That is, the second image processing program can also be at least one of the following: image preprocessing program, demosaicing program, color curve correction program, color correction program, edge enhancement program, scaling program, color dithering program, and image postprocessing program.
[0125] In one embodiment, the algorithm is directly burned into the image processing hardware 112 and recorded in the simulation software 122 without needing to be obtained separately.
[0126] In one embodiment, step S16 involves the image processing hardware 112 transmitting the hardware-processed image to the test device 12 via the image processing device 11, while step S20 involves the simulation software 122 directly outputting the software-processed image generated after calculation to the test device 12.
[0127] After step S20, the testing device 12 can execute the testing software 123, which performs a comparison program on the hardware-processed image and the software-processed image and generates corresponding comparison results (step S22). The testing device 12 then outputs the comparison results (step S24) so that the user can know the difference between the hardware-processed image and the software-processed image.
[0128] In one embodiment, the comparison results generated by the testing software 123 can display the pixel differences between the hardware-processed image and the software-processed image. Specifically, the comparison results can record the differences in the three primary colors (i.e., red (R), green (G), and black (B)) of each pixel position (or a portion of specified pixel positions) in the hardware-processed image and the software-processed image.
[0129] In the above embodiments, the testing device 12 obtains the original image and parameter settings from the control unit 10, and obtains the hardware-processed image from the image processing hardware 112. In other embodiments, the testing device 12 may also directly obtain the original image, parameter settings, and hardware-processed image from the image processing hardware 112 (details to follow).
[0130] It is worth noting that the original image file format can be an image file (e.g., an image file with the extension .jpg or .bmp) or a converted text file (e.g., a text file with the extension .txt or .hex), but there is no limitation on this. The impact of image files and text files on the image processing algorithm will not be elaborated here.
[0131] Please refer to the following for further details. Figure 1 and Figure 3 This is a second specific embodiment of the block diagram of the testing system of the present invention. Specifically, Figure 3 The following explanation uses a test system 1 as an example, which is a single, independent computer, server, or electronic device with special specifications.
[0132] like Figure 3 As shown, the test system 1 may include the control unit 10, image processing hardware 112, simulation software 122, and storage unit 13 described above. The storage unit 13 may be, for example, a memory, a hard disk, or other form of storage medium, and the storage unit 13 may store the original image 131 to be processed, as well as parameter settings 132 required by one or more image processing algorithms.
[0133] In this embodiment, the test system 1 can drive the image processing hardware 112 through the control unit 10 or another processor (not shown), and execute the simulation software 122 through the control unit 10 or another processor. Furthermore, the control unit 10 can provide the original image 131 and parameter setting values 132 from the storage unit 13 to the image processing hardware 112 and the simulation software 122, respectively.
[0134] Image processing hardware 112 executes the first image processing program on the original image 131 according to parameter setting value 132 to generate a hardware-processed image, and outputs it to transmission unit 14. Simulation software 122 executes the second image processing program on the original image 131 according to parameter setting value 132 to generate a software-processed image, and outputs it to transmission unit 14. Furthermore, transmission unit 14 transmits the hardware-processed image and the software-processed image to comparison unit 15 for comparison.
[0135] In one embodiment, the transmission unit 14 and the comparison unit 15 are software units generated after the control unit 10 or processor of the test system 1 executes specific program code (such as the aforementioned test software 123). The transmission unit 14 is used to input the hardware-processed image and the software-processed image as input parameters into the test software 123.
[0136] In another embodiment, the comparison unit 15 may be located on a cloud server (not shown in the figure). In this embodiment, the transmission unit 14 may be a physical transmission unit in the test system 1 (e.g., a Wi-Fi transmission unit, a Bluetooth transmission unit, a Near Field Communication (NFC) transmission unit, a Zigbee transmission unit, etc.), used to transmit the hardware-processed image and the software-processed image to the comparison unit 15, and to receive the comparison results transmitted by the comparison unit 15.
[0137] At Figure 3 In some embodiments, the test system 1 may also have an output unit 16 (e.g., a display). The test system 1 may selectively display the original file 131, parameter settings 132, hardware-processed image, software-processed image, and comparison results through the output unit 16, so that users can more easily understand the status of the currently used algorithm.
[0138] The above embodiments use a single, independent computer, server, or electronic device as an example for illustration. However, as mentioned above, the test system 1 of the present invention can also be implemented by two or more separate physical devices.
[0139] Please also refer to Figure 3 , Figure 4 and Figure 5 ,in Figure 4 This is a third specific embodiment of the block diagram of the testing system of the present invention. Figure 5 This is a first specific embodiment of the test system of the present invention.
[0140] Figure 4 and Figure 5 The separately configured image processing device 2 and testing device 3 were revealed. For example... Figure 4 As shown, the image processing device 2 has a first processor 21, and the testing device 3 has a second processor 31. When the image processing device 2 is connected to the testing device 3, either the first processor 21 or the second processor 31 can serve as the aforementioned control unit 10, and the image processing device 2, the testing device 3, and the control unit 10 can jointly implement the testing system 1 and testing method of the present invention.
[0141] At Figure 5 In the illustrated embodiment, the image processing device 2 is a medical endoscope used to detect external images in real time. In this embodiment, the testing system 1 uses the external images detected by the image processing device 2 as the original images, and the image processing device 2 and the testing device 3 respectively perform image processing on the original images.
[0142] In one embodiment, the testing device 3 is a computer, server, or a specially designed electronic device, and is located in the same place as the image processing device 2. In this embodiment, the image processing device 2 establishes a connection with the testing device 3 via a wired connection (e.g., USB cable) or a wireless connection (e.g., Wi-Fi, Bluetooth, NFC, etc.).
[0143] In another embodiment, the testing device 3 is a cloud server. In this embodiment, the image processing device 2 establishes a wireless connection with the testing device 3 via the Internet.
[0144] like Figure 4 As shown, the image processing device 2 may include a first processor 21, and a human-machine interface 22, a sensing unit 23, a first storage unit 24, image processing hardware 25, a first transmission unit 26 and a first display unit 27 electrically connected to the first processor 21.
[0145] In one embodiment, the image processing device 2 accepts external operations via a human-machine interface 22 (e.g., a button, a touch screen, or a signal input port) to import the original image 241 into the image processing device 2 and set the parameter settings 242 required by the image processing algorithm. The original image 241 and the parameter settings 242 can be stored in the first storage unit 24.
[0146] In one embodiment, a user can operate the image processing device 2 through the human-machine interface 22 to import the original image 241 and parameter settings 242 into the image processing device 2 by means of copying, downloading or data transmission.
[0147] In another embodiment, the image processing device 2 senses the external environment through the sensing unit 23, thereby directly generating the original image 241. In this embodiment, the sensing unit 23 may be, for example, a camera, an infrared sensor, a laser sensor, an ultrasonic sensor, etc., and is not limited thereto. Furthermore, the sensing unit 23 may also be a signal input port such as a High Definition Multimedia Interface (HDMI), a Video Graphics Array (VGA), a Digital Visual Interface (DVI), or a DisplayPort (DP), to directly receive external image signals and generate the original image 241. The above are only some specific embodiments of the present invention, and are not limited thereto.
[0148] The image processing hardware 25 is programmed with a first algorithm 251 required to execute the first image processing program. After the image processing device 2 obtains the original image 241 and the parameter setting value 242, the control unit 10 (e.g., the first processor 21 or the second processor 31) drives the image processing hardware 25 to execute the first algorithm 251 according to the parameter setting value 242, so as to perform the first image processing on the original image 241 and generate a hardware-processed image. Furthermore, the image processing device 2 can transmit the original image 241, the parameter setting value 242, and the hardware-processed image to the test device 3 through the first transmission unit 26.
[0149] It is worth mentioning that if the image processing device 2 has a first display unit 27 (e.g., a touch screen or a liquid crystal display, LCD), the first processor 21 can also display at least one of the original image 241, parameter setting value 242 and hardware-processed image on the first display unit 27 for user confirmation.
[0150] like Figure 4 As shown, the testing device 3 may have a second processor 31, and a second transmission unit 32, a second storage unit 33, a comparison unit 34, and a second display unit 35 connected to the second processor 31. The second storage unit 33 stores simulation software 331 for executing the second image processing program, and a second algorithm 332 required for executing the second image processing program. It is worth noting that the second algorithm 332 may be directly recorded in the simulation software 331 as computer program code, but is not limited to this.
[0151] In this embodiment, the test device 3 is connected to the image processing device 2 through the second transmission unit 32 to receive the original image 241, parameter setting value 242 and hardware-processed image transmitted by the image processing device 2.
[0152] The testing device 3 executes the simulation software 331 in the second storage unit 33 via the second processor 31. As described above, after the simulation software 331 is executed, it can perform a second image processing program on the original image 241 based on the received parameter setting value 242, and generate a software-processed image. Furthermore, the testing device 3 can compare the hardware-processed image provided by the image processing device 2 and the software-processed image generated by the simulation software 331 by the comparison unit 34, so as to generate a comparison result that can show the pixel differences between the hardware-processed image and the software-processed image.
[0153] In one embodiment, the comparison unit 34 may be a physical unit, such as a microcontroller or processor. In another embodiment, the comparison unit 34 may be a second processor 31 executing... Figure 1 The software units implemented after the test software 123 shown are not limited.
[0154] After the comparison unit 34 completes the comparison and generates the comparison result, the test device 3 can display the comparison result through the second display unit 35 so that the user can know the pixel difference between the image after hardware processing and the image after software processing, and determine whether the first algorithm 251, the second algorithm 332 or the parameter setting value 242 needs to be adjusted based on the comparison result.
[0155] As mentioned above, the first algorithm 251 executed by the image processing hardware 25 is the same as the second algorithm 332 executed by the simulation software 331, and the original image 241 and parameter settings 242 used are also the same. Therefore, if the comparison results show that the pixel difference between the hardware-processed image and the software-processed image is greater than the allowable threshold, it means that there is a problem with the first algorithm 251 / second algorithm 332 or the parameter settings 242. Accordingly, the user can adjust the first algorithm 251 / second algorithm 332 or the parameter settings 242 to ensure that the final designed IC (i.e., the image processing hardware 25 equipped with the correct algorithm and parameter settings) meets the user's needs.
[0156] In the above Figure 4 and Figure 5 In this embodiment, the image processing device 2 and the testing device 3 exist independently. Therefore, the image processing device 2 can provide the original image 241, parameter setting values 242, and hardware-processed image to the testing device 3 in different ways. The following description is based on different figures.
[0157] Please also refer to Figure 4 and Figure 6 ,in Figure 6 This is a second specific embodiment of the test method flowchart of the present invention. Figure 6 In this embodiment, the image processing device 2 first acquires the original image 241 and parameter setting values 242, and stores the original image 241 and parameter setting values 242 in the first storage unit 24 (e.g., a memory). Then, the image processing device 2, through the control unit 10 (e.g., the first processor 21), projects the original image 241 to a first location on the desktop of the first operating system (e.g., a Linux operating system) executed by the image processing device 2 (step S30). Next, the control unit 10 activates the engineering mode of the first operating system to read the parameter setting values 242 from the first storage unit 24 and modify them (if necessary) (step S31), and drives the image processing hardware 25 to perform specified tasks via instructions (step S32).
[0158] In one embodiment, in step S30, the image processing device 2 receives external operations through the human-machine interface 22 to import the original image 241, or senses the external environment through the sensing unit 23 to generate the original image 241 in real time, without limitation.
[0159] After step S32, the image processing hardware 25 retrieves the original image 241 from the first location on the desktop of the first operating system based on the instruction (step S33), and executes the first image processing program (e.g., executes the first algorithm 251) on the original image 241 according to the parameter setting value 242 (step S34), and generates the hardware-processed image.
[0160] After step S34, the image processing hardware 25 transmits the hardware-processed image to the first processor 21 of the image processing device 2, and the first processor 21 projects the hardware-processed image onto a second position on the desktop of the first operating system (step S35). The first position and the second position do not overlap on the desktop.
[0161] After step S35, the first processor 21 captures the entire desktop of the first operating system and transmits the entire desktop and the parameter setting value 242 used by the first image processing program to the test device 3 through the first transmission unit 26 (step S36).
[0162] Please also refer to Figure 8 This is a first specific embodiment of the desktop screenshot diagram of the present invention. Figure 8As shown, after the image processing device 2 executes the first operating system, it generates a corresponding desktop 41 and displays it through the first display unit 27. After the image processing device 2 acquires the original image 241 through the human-machine interface 22 or the sensing unit 23, the first processor 21 projects the original image 241 onto a first position 42 on the desktop 41. After the image processing hardware 25 generates a hardware-processed image 243 through the first image processing program, the first processor 21 projects the hardware-processed image 243 onto a second position 43 on the desktop 41.
[0163] Depend on Figure 8 It can be seen that the entire desktop 41 of the first operating system simultaneously contains the original image 241 and the hardware-processed image 243, which do not overlap with each other. Therefore, as long as the image processing device 2 transmits the entire desktop 41 to the test device 3, the test device 3 can obtain the original image 241 and the hardware-processed image 243 separately by segmenting the image of the entire desktop 41.
[0164] Back Figure 6 After step S36, the test device 3 receives the image of the entire desktop 41 and the parameter setting value 242 transmitted by the image processing device 22 through the second transmission unit 32, and the second processing unit 31 segments the desktop 41 to extract the original image 241 and the hardware-processed image 243 (step S37).
[0165] Next, the testing device 3 executes simulation software 331. The simulation software 331 performs a second image processing procedure (e.g., executes a second algorithm 332) on the original image 241 according to parameter settings 243 (step S38), and generates a software-processed image. Furthermore, the testing device 3 executes... Figure 1 The test software 123 (i.e., comparison unit 34) shown compares the hardware-processed image 243 with the software-processed image and generates a comparison result (step S39). Finally, the test device 3 can display the comparison result through the second display unit 35 (step S40).
[0166] At Figure 6 In this embodiment, the image processing device 2 projects the original image 241 and the hardware-processed image 243 onto the desktop 41, which facilitates recording and confirmation by the user. Thus, when the comparison results show that the pixel difference between the hardware-processed image 243 and the software-processed image exceeds an allowable threshold, the user can use the image on the desktop 41 to trace whether there are problems with the first algorithm 251, the second algorithm 332, and the original image 241 and parameter settings 242 used.
[0167] Please also refer to Figure 4 and Figure 7,in Figure 7 This is a third specific embodiment of the test method flowchart of the present invention. Figure 7 In this embodiment, the image processing device 2 first acquires the original image 241 and parameter setting values 242, and stores them in a first designated folder under the first operating system (e.g., Linux operating system) executed by the image processing device 2 (step S50). Next, the control unit 10 opens the engineering mode of the first operating system to read the parameter setting values 242 from the first designated folder and modify them (if necessary) (step S51), and drives the image processing hardware 25 to perform the specified work through instructions (step S52).
[0168] After step S52, the image processing hardware 25 retrieves the original image 241 from the first designated folder based on the instruction (step S53), and executes a first image processing program (e.g., executes the first algorithm 251) on the original image 241 according to the parameter setting value 242 (step S54), and generates a hardware-processed image. After step S54, the image processing hardware 25 directly stores the generated hardware-processed image and the parameter setting value 242 used (which may have been modified) into the first designated folder (step S55). Specifically, the hardware-processed image does not overwrite the original image 241 in the first designated folder.
[0169] After step S55, the first processor 21 of the image processing device 2 transmits all the data in the first designated folder to the test device 3 through the first transmission unit 26 (step S56).
[0170] After step S56, the test device 3 receives all the data transmitted by the image processing device 2 through the second transmission unit 32 and stores it in the second designated folder under the second operating system (e.g., Windows operating system) executed by the test device 3 (step S57). Next, the test device 3 executes the simulation software 331 through the second processor 31. The simulation software 331 obtains the original image 241 from the second designated folder (step S58) and executes the second image processing program (e.g., executes the second algorithm 332) on the original image 241 according to the parameter setting value 243 (step S59), and generates the software-processed image.
[0171] After step S59, the testing device 3 executes the following through the second processor 31: Figure 1The test software 123 (i.e., the trigger comparison unit 34) compares the hardware-processed image 243 with the software-processed image and generates a comparison result (step S60). Finally, the test device 3 can display the comparison result through the second display unit 35 (step S61). In this embodiment, the test device 3 can also selectively store the generated software-processed image and the comparison result in a second designated folder for record-keeping.
[0172] At Figure 7 In this embodiment, the image processing device 2 stores the original image 241 and the hardware-processed image 243 in a first designated folder under a first operating system, while the testing device 3 stores the original image 241, the hardware-processed image 243, the software-processed image, and the comparison result in a second designated folder under a second operating system, which facilitates recording and confirmation by the user. Therefore, when the comparison result shows that the pixel difference between the hardware-processed image 243 and the software-processed image is greater than the allowable threshold, the user can use the contents of the first and second designated folders to investigate whether there are problems with the first algorithm 251, the second algorithm 332, and the original image 241 and parameter settings 242 used.
[0173] In the above embodiments, the test system 1 first drives the image processing hardware 25 through the image processing device 11 to process the original image 241 and generate a hardware-processed image 243. Then, the test device 3 executes the simulation software 331 to process the original image 241 and generate a software-processed image. Finally, the test device 3 compares the hardware-processed image 243 and the software-processed image. However, in other embodiments, the comparison procedure can also be executed by the image processing device 11.
[0174] Specifically, in other embodiments, the test device 3 can acquire the original image 241 and parameter setting values 242, and store them in a designated folder under the executed second operating system (e.g., Windows operating system). Then, the test device 3 can execute simulation software 331 via the second processor 31. The simulation software 331 reads the original image 241 and parameter setting values 242 from the designated folder, and performs an image processing program on the original image 241 according to the parameter setting values 242 to generate a software-processed image. Furthermore, the simulation software 331 stores the generated software-processed image back into the designated folder.
[0175] Next, the testing device 3 transmits all the data in the designated folder to the image processing device 2 and stores it in the designated folder under the first operating system (e.g., Linux operating system) executed by the image processing device 2. The image processing device 11 can open the engineering mode through the second processor 21 to read the parameter setting value 2 and drive the image processing hardware 25. After the image processing hardware 25 is driven, it retrieves the original image 241 from the designated folder based on the instructions, and performs image processing on the original image 241 according to the parameter setting value 242 to generate the hardware-processed image 243.
[0176] In this embodiment, the image processing hardware 25 can also be driven by the second processor 21 to obtain the software-processed image transmitted by the test device 3 from the designated folder, and compare the hardware-processed image 243 with the software-processed image to generate a comparison result.
[0177] The testing method of the present invention can be used by image processing device 2 or testing device 3 to compare the hardware-processed image 243 with the software-processed image, so as to automatically identify the pixel differences in the image generated after the image processing hardware 25 and the simulation software 331 respectively executed the same algorithm on the same image.
[0178] As described above, one of the main objectives of this invention is to automatically identify the differences between the image processing hardware 25 and the simulation software 331 after executing the same algorithm, thereby assisting the user in determining whether there is a problem with the algorithm or with the relevant parameters of the algorithm.
[0179] It is worth mentioning that a complete image processing program typically includes multiple algorithms executed sequentially. In one embodiment of the present invention, the testing system 1 can assign each algorithm in the image processing program to the image processing hardware 25 and the simulation software 331 for execution, and establish a test point (TP) after each algorithm is executed. At the test point, the hardware-processed image 243 and the software-processed image generated by the image processing hardware 25 and the simulation software 331 are compared respectively. In this way, once the comparison result shows that there is a pixel difference between the hardware-processed image 243 and the software-processed image exceeding the allowable threshold value, the user can adjust the algorithm or parameter setting value 242 executed before this test point to optimize the final designed image processing hardware 25 (i.e., IC).
[0180] Please also refer to Figure 4 , Figure 9a and Figure 9b ,in Figure 9a and Figure 9bThese are first specific embodiments of the first image processing flowchart and the second image processing flowchart of the present invention. Figure 9a , Figure 9b In this embodiment, the test system 1 first instructs the image processing hardware 25 and the simulation software 331 to acquire the original image 241 respectively (step S70), and then compares the original images 241 acquired by the two and outputs a first comparison result (step S71). Through the first comparison result, the user can determine whether the original images 241 acquired by the image processing hardware 25 and the simulation software 331 are the same.
[0181] Next, the test system 1 instructs the image processing hardware 25 and the simulation software 331 to perform image preprocessing procedures on the original image 241 based on the same algorithm and parameter settings 242 (step S72), and compares the first processed images generated by the two systems and outputs a second comparison result (step S73). Through the second comparison result, the user can determine whether the algorithm and parameter settings 242 used by the image processing hardware 25 and the simulation software 331 to perform the image preprocessing procedures are incorrect.
[0182] Specifically, if the test system 1 acquires the original image 241 through the sensing unit 23 of the image processing device 2, the sensed image is usually subject to external interference (such as noise) or internal interference (such as the optical or physical characteristics of the lens). These interferences will affect the subsequent process's judgment of the original image 241, and therefore need to be processed by an image preprocessing procedure.
[0183] Next, the test system 1 instructs the image processing hardware 25 and the simulation software 331 to perform a de-mosaic processing procedure on the first processed image based on the same algorithm and parameter settings 242 (step S74), and compares the second processed images generated by the two systems and outputs a third comparison result (step S75). Through the third comparison result, the user can determine whether the algorithm and parameter settings 242 used by the image processing hardware 25 and the simulation software 331 to perform the de-mosaic processing procedure are incorrect.
[0184] Specifically, a commonly used image sensing unit can be, for example, a Bayer sensor. If the test system 1 acquires the original image 241 through the Bayer sensor, the processed image can be converted to the three primary colors (RGB) range through a de-mosaic processing procedure.
[0185] Next, the test system 1 instructs the image processing hardware 25 and the simulation software 331 to perform a color curve correction process on the second processed image based on the same parameter setting value 242 (step S76), and compares the third processed images generated by the two respectively and outputs a fourth comparison result (step S77). Through the third comparison result, the user can determine whether the algorithm used by the image processing hardware 25 and the simulation software 331 to perform the color curve correction process and the parameter setting value 242 are incorrect.
[0186] Specifically, the color gradation curve correction process corrects and adjusts the image's color in the three primary color domain to adjust the image's color and brightness to a level that better matches human visual perception.
[0187] Next, the test system 1 instructs the image processing hardware 25 and the simulation software 331 to perform color correction processing on the third processed image based on the same parameter setting value 242 (step S78), and compares the fourth processed image generated by the two respectively and outputs a fifth comparison result (step S79). Through the fifth comparison result, the user can determine whether the algorithm used by the image processing hardware 25 and the simulation software 331 to perform color correction processing and the parameter setting value 242 are incorrect.
[0188] Specifically, since everyone's perception of images is different, after the color curve correction process, the test system 1 can selectively execute a color correction process to fine-tune the colors in the image by increasing the gain of each of the three primary colors.
[0189] Next, the test system 1 can selectively instruct the image processing hardware 25 and the simulation software 331 to perform edge enhancement processing on the fourth processed image based on the same parameter setting value 242 (step S80), and compare the fifth processed images generated by the two respectively and output a sixth comparison result (step S81). Through the sixth comparison result, the user can determine whether the algorithm used by the image processing hardware 25 and the simulation software 331 to perform the edge enhancement processing and the parameter setting value 242 are incorrect.
[0190] Specifically, the edge enhancement processing procedure is not necessary. For example, if the present invention is applied to the processing of television images, it is sufficient to make the image conform to human visual perception, and there is no need to perform an edge enhancement processing procedure. Furthermore, if the present invention is applied to the processing of medical images, since doctors need to see more details in the image (such as finer blood vessels or tissues), they can selectively perform an edge enhancement processing procedure.
[0191] It is worth noting that edge enhancement processing typically adjusts image brightness. If edge enhancement processing is performed before color curve correction processing, the color curve correction process may reduce the effectiveness of edge enhancement. Therefore, in one embodiment, edge enhancement processing must be performed after color curve correction processing has been completed, but this is not a limitation.
[0192] After step S81, the test system 1 can instruct the image processing hardware 25 and the simulation software 331 to perform a scaling process on the fifth processed image based on the same parameter setting value 242 (step S82), and compare the sixth processed images generated by the two respectively and output a seventh comparison result (step S83). Through the seventh comparison result, the user can determine whether the algorithm used by the image processing hardware 25 and the simulation software 331 to perform the scaling process and the parameter setting value 242 are incorrect.
[0193] Specifically, the purpose of performing the scaling process is to match the size of the monitor (not shown in the figure) so that the processed image can be fully displayed on the monitor.
[0194] Next, the test system 1 can instruct the image processing hardware 25 and the simulation software 331 to perform a color-dithering process on the sixth processed image based on the same parameter setting value 242 (step S84), and compare the seventh processed images generated by the two respectively and output an eighth comparison result (step S85). Through the eighth comparison result, the user can determine whether the algorithm used by the image processing hardware 25 and the simulation software 331 to perform the color-dithering process and the parameter setting value 242 are incorrect.
[0195] Specifically, the color dithering process is mainly used to handle quantization errors encountered during high-to-low resolution conversion. The color dithering process typically adds random noise to the image, while the aforementioned scaling process uses interpolation techniques. If the color dithering process is executed before the scaling process, the noise added by the color dithering process will interfere with the scaling effect. Therefore, in one embodiment, the color dithering process must be executed after the scaling process has been completed, but this is not a limitation.
[0196] After step S85, the test system 1 has completed all the image processing procedures, and can therefore output the processed image (including outputting the hardware-processed image 243 and / or the software-processed image) through the image processing device 2 or the test device 3 (step S86).
[0197] In one embodiment, the scaling and color-dithering processes are not necessarily executed. In this embodiment, after the edge enhancement process is completed, the testing system 1 can further instruct the image processing hardware 25 and the simulation software 331 to perform image post-processing on the fifth processed image based on the same parameter settings 242 (step S87). Furthermore, the testing system 1 compares the processed results generated by both and outputs a ninth comparison result (step S88). Through the ninth comparison result, the user can determine whether the algorithm and parameter settings 242 used by the image processing hardware 25 and the simulation software 331 to execute the image post-processing are incorrect.
[0198] It is worth mentioning that the image post-processing program can, for example, execute an AI recognition algorithm to identify the Region of Interest (ROI) in the image. Specifically, the image post-processing program can identify and mark the object of interest in the image based on parameter setting value 242 (e.g., by framing the object with a box), and assign a specific box size and coordinates (e.g., the starting coordinates of the box) to this object. In step S88, the test system 1 compares the ROIs (here, numerical values rather than images) generated by the image processing hardware 25 and the simulation software 331 respectively.
[0199] Specifically, image post-processing typically employs object detection technology. Strengthening the image edges beforehand can effectively reduce the false positive rate of object detection. Therefore, in one embodiment, the image post-processing procedure must be executed after the edge strengthening process is completed, but this is not a limitation.
[0200] The above Figure 9a , Figure 9b The illustration shown is merely one specific embodiment of the present invention. In one embodiment, the test system 1 only needs to instruct the image processing hardware 25 and the simulation software 331 to execute the image preprocessing program, the de-mosaic processing program, the color curve correction program, the color correction program, the scaling program, and the color dithering program, and instruct the test software 123 (i.e., the comparison unit 34) to execute the comparison program on the hardware-processed image 243 and the software-processed image generated after each processing program and generate the comparison results.
[0201] Through the above-described sequentially executed processing procedures, the test system 1 can complete the testing of all necessary algorithms and parameter settings of the image processing program, so as to facilitate the user to correct and optimize the algorithms and parameters of the image processing hardware 25 (i.e., design IC).
[0202] In the aforementioned embodiments, the testing system 1 primarily allows the image processing hardware 25 and the simulation software 331 to execute the same algorithm using the same parameter settings 242. However, in embodiments where the original image 241 is sensed and generated by the sensing unit 23 of the image processing device 2, since most of the sensing units 23 are not ideal, their imaging will deviate from expectations.
[0203] Since it is impossible to find a perfectly flawless sensing unit 23, multiple trial-and-error processes are generally required to correct the image processing hardware 25 (e.g., adjusting the parameters used) to bring the image (i.e., the original image 241 and the hardware-processed image 243) closer to the ideal. To this end, the present invention discloses a real-time update method, which is described in detail below.
[0204] Please also refer to Figure 4 and Figure 10 ,in Figure 10 This is a first specific embodiment of the lookup table update flowchart of the present invention. For example... Figure 10 As shown, firstly, the user connects the external sensing unit 23 (e.g., camera, infrared sensor, laser sensor, medical endoscope, etc.) to the image processing device 2 (step S90). Then, the first processor 21 of the image processing device 2 acquires the setting information of the sensing unit 23 (step S91) and causes the sensing unit 23 to capture a specific image (step S92).
[0205] In one embodiment, the setting information may be, for example, the model number of times the sensing unit 23 has been used, calibration records, etc. The specific image may be, for example, a pure white image, a pure black image, a striped image, or the current external image, but is not limited thereto.
[0206] Next, the first processor 21 analyzes the setting information and the specific image (step S93) to determine which lookup table the sensing unit 23 should use (step S94). In one embodiment, the first processor 21 analyzes the setting information and the specific image through an internal analysis unit, which may be, for example, the first processor 21 itself, or execute something like... Figure 1 The software unit generated after the test software 123 is shown.
[0207] In another embodiment, the first processor 21 analyzes the setting information and specific images through an external analysis unit, which may be, for example, an electronic device or a cloud server connected to the image processing device 2 via a network, but is not limited thereto.
[0208] The lookup table refers to the lookup table used by the hardware processing hardware 25 to execute the corresponding algorithm, and records the various parameters required by the sensing unit 23 when executing the algorithm.
[0209] After step S94, the test system 1 can obtain the corresponding new lookup table (step S95), and update the old lookup table (not shown in the figure) based on the new lookup table (step S96). In one embodiment, in step S95, the test system 1 can read and use the corresponding lookup table from the first storage unit 24 based on the analysis result of step S94, or download the corresponding lookup table from an external electronic device or cloud server, without limitation.
[0210] With the above-described update method, the user can ensure the quality of the image processing program without adjusting the image processing device 2 and the sensing unit 23. Specifically, after connecting the sensing unit 23 to the image processing device 2, the image processing device 2 can automatically obtain the most appropriate lookup table based on the information from the sensing unit 23 (such as lens condition, external interference, etc.) and update the image processing device 2.
[0211] Taking the image processing device 2 as an example of a medical instrument, when a doctor is performing emergency treatment in an ambulance or operating room, they may want to obtain the patient's physiological images immediately. With the updated method described above, after the doctor connects the endoscope (i.e., the sensing unit 23) to the machine (i.e., the image processing device 2), the machine can automatically judge and correct the data in a few seconds to obtain the lookup table most suitable for the endoscope to perform various image processing algorithms, without the doctor having to spend time adjusting the machine.
[0212] For example, when a doctor goes out to perform medical procedures (such as a mobile medical unit), they may only have one or two endoscopes on hand. If the image quality of the endoscope is poor and there is no equipment to adjust it or a spare endoscope available, the lookup table for the most suitable endoscope can be automatically updated using the above-mentioned update method, thereby maintaining the quality of the images sensed by these endoscopes.
[0213] For example, when hospitals conduct large-scale medical testing, the aforementioned update method allows machines to automatically determine and update lookup tables that best suit various sensors, enabling even non-professional users to operate the system. This allows hospitals to quickly obtain standardized and usable images and expands the user base.
[0214] As described above, updating the lookup table of the image processing hardware 23 when executing the image processing algorithm using information from the sensing unit 23 can effectively improve image quality. The lookup table is generally stored in the memory of the image processing device 2 (e.g., the first storage unit 24). However, updating the lookup table in memory typically requires pausing the currently executing image processing program or using twice the memory capacity, which is quite inconvenient for some application scenarios.
[0215] In view of this, the present invention further proposes a novel update method that can complete the real-time lookup table update without pausing the image processing program and without using twice the memory.
[0216] See Figure 4 and Figure 11 ,in Figure 11 This is a first specific embodiment of the lookup table update diagram of the present invention. For example... Figure 11 As shown, the first storage unit 24 of the image processing device 2 mainly has a first channel C1 and a second channel C2, wherein the first storage unit 24 is connected to the image processing hardware 25 through the first channel C1 and to the first processor 21 through the second channel C2.
[0217] At Figure 11 In one embodiment, when the image processing hardware 25 executes the algorithm, it can read the first lookup table 61 initially corresponding to the algorithm from the first storage unit 24 through the first channel C1.
[0218] When the first processor 21 analyzes the information from the currently used sensing unit 23 and determines that the first lookup table 61 should be updated, the first processor 21 can obtain a second lookup table 62 based on the analysis results (e.g., generated by the first processor 21 in real time, or downloaded from a cloud server), and transmit the second lookup table 62 to the first storage unit 24 via the second channel C2. Thereby, the first storage unit 24 updates the originally stored first lookup table 61 based on the contents of the second lookup table 62, and provides the updated first lookup table 61 to the image processing hardware 25 for continued use via the first channel C1.
[0219] By using the dual-channel first storage unit 24, the image processing apparatus 2 can perform real-time lookup table update operations without stopping the image processing hardware 25 from executing the image processing program and without using twice the memory space.
[0220] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.
Claims
1. A testing system for image processing algorithms, characterized in that, include: An external sensing unit is used to sense the external environment to generate a raw image; A control unit provides a parameter setting value; An image processing device is connected to the control unit and the external sensing unit, which acquires the original image from the external sensing unit and the parameter setting value from the control unit; Image processing hardware, connected to and driven by the image processing device, performs a first image processing program on the original image based on the parameter settings and generates a hardware-processed image; and A testing device is connected to the control unit and the image processing hardware. It obtains the processed image from the image processing hardware and obtains the original image and the parameter setting value from the control unit or the image processing hardware. The testing device executes a simulation software and a testing software. The simulation software performs a second image processing program on the original image based on the parameter settings and generates a software-processed image. The testing software performs a comparison program on the hardware-processed image and the software-processed image and generates a comparison result. The second image processing program is the same as the first image processing program. The comparison result shows a one-pixel difference between the hardware-processed image and the software-processed image. The first image processing program and the second image processing program include multiple algorithms that are executed sequentially. After each algorithm is executed, the test system establishes a test point and generates the hardware-processed image and the software-processed image at each test point and compares them. After the image processing device is connected to the external sensing unit, the control unit obtains the setting information of the external sensing unit and causes the external sensing unit to capture a specific image. The control unit analyzes the setting information and the specific image to determine the lookup table that the external sensing unit should use. The lookup table records the parameter setting values required by the image processing hardware when executing the multiple algorithms when using the external sensing unit.
2. The testing system for the image processing algorithm according to claim 1, characterized in that, The image processing hardware is a field-programmable gate array, an application-specific integrated circuit, or a graphics processor.
3. The testing system for the image processing algorithm according to claim 1, characterized in that, The image processing device executes a first operating system, while the testing device executes a second operating system that is different from the first operating system.
4. The testing system for the image processing algorithm according to claim 3, characterized in that, The first operating system is Linux, and the second operating system is Windows.
5. The testing system for the image processing algorithm according to claim 3, characterized in that, The testing device is a cloud server, and the cloud server is wirelessly connected to the control unit and the image processing device via a network.
6. The testing system for the image processing algorithm according to claim 3, characterized in that, The image processing device has a first transmission unit, and the testing device has a second transmission unit. The image processing hardware transmits the hardware-processed image to the testing device via the first transmission unit of the image processing device, and the testing device receives the hardware-processed image via the second transmission unit.
7. The testing system for the image processing algorithm according to claim 6, characterized in that, The control unit projects the original image onto a first position on a desktop of the first operating system. The image processing hardware is driven to capture the original image from the first position. The image processing device includes a first processor. The first processor projects the hardware-processed image onto a second position on the desktop that does not overlap with the first position. The first processor captures the desktop and transmits the desktop and the parameter settings to the test device.
8. The testing system for the image processing algorithm according to claim 6, characterized in that, The control unit stores the original image and the parameter setting value in a designated folder in the first operating system. The image processing hardware is driven to read the original image from the designated folder and store the hardware-processed image in the designated folder. The image processing device includes a first processor, which transmits all the data in the designated folder to the test device.
9. The testing system for the image processing algorithm according to claim 3, characterized in that, The first image processing program and the second image processing program are at least one of an image preprocessing program, a de-mosaic processing program, a color curve correction processing program, a color correction processing program, an edge enhancement processing program, a scaling processing program, a color dithering processing program, and an image postprocessing program.
10. The testing system for the image processing algorithm according to claim 9, characterized in that, The image processing hardware and the simulation software sequentially execute the image preprocessing program, the de-mosaic processing program, the color level curve correction program, the color correction program, the scaling program, and the color dithering program. The test software executes the comparison program on the hardware-processed image and the software-processed image generated after each of the processing programs, and generates the corresponding comparison results.
11. The testing system for the image processing algorithm according to claim 3, characterized in that, The image processing device includes: A human-machine interface that accepts external operations to import the original image and set the parameter settings; and A sensing unit senses an external environment to generate the original image.
12. A testing method for an image processing algorithm, applied to a test system having an image processing apparatus for controlling a first image processing program and a testing apparatus for controlling a second image processing program, characterized in that, include: Step a) The external environment is sensed by an external sensing unit connected to the image processing device to generate an original image, and a parameter setting value is obtained by a control unit. After the external sensing unit is connected to the image processing device, the control unit obtains the setting information of the external sensing unit and causes the external sensing unit to capture a specific image. The control unit analyzes the setting information and the specific image to determine the lookup table that the external sensing unit should use. The lookup table records the parameter setting value required by an image processing hardware to execute multiple algorithms when using the external sensing unit. Step b) The image processing hardware is driven by the image processing device to execute the first image processing program on the original image based on the parameter setting value and generate a hardware-processed image. Step c) The testing device acquires the image processed by the image processing hardware. Step d) The testing device executes simulation software, which performs the second image processing procedure on the original image based on the parameter settings and generates a software-processed image, wherein the second image processing procedure is the same as the first image processing procedure; and Step e) The testing device executes testing software, which performs a comparison program on the hardware-processed image and the software-processed image and generates a comparison result, wherein the comparison result shows a one-pixel difference between the hardware-processed image and the software-processed image; wherein the first image processing program and the second image processing program include multiple algorithms executed sequentially, and the testing system establishes a test point after each algorithm is executed, and generates the hardware-processed image and the software-processed image at each test point and compares them.
13. The testing method for the image processing algorithm according to claim 12, characterized in that, The image processing hardware is a field-programmable gate array, an application-specific integrated circuit, or a graphics processor. The image processing device executes a first operating system, and the test device executes a second operating system different from the first operating system.
14. The testing method for the image processing algorithm according to claim 13, characterized in that, Step c involves the image processing device transmitting the hardware-processed image to the testing device via a first transmission unit, and the testing device receiving the hardware-processed image via a second transmission unit.
15. The testing method for the image processing algorithm according to claim 14, characterized in that, Step a) is followed by step a1): the control unit projects the original image onto a first location on a desktop of the first operating system; step b) is driven by the image processing hardware to capture the original image from the first location; and step b) is followed by: b1) The image processing hardware transmits the hardware-processed image to a first processor of the image processing device. b2) The first processor projects the hardware-processed image onto a second position on the desktop that does not overlap with the first position; and b3) The first processor captures the desktop and transmits the desktop and the parameter settings to the test device.
16. The testing method for the image processing algorithm according to claim 14, characterized in that, Step a) is followed by step a1): the control unit stores the original image and the parameter settings in a designated folder in the first operating system; step b) is driven by the image processing hardware to read the original image from the designated folder, and step b) is followed by: b4) The image processing hardware stores the hardware-processed image into the designated folder; and b5) A first processor of the image processing device transmits all the data in the designated folder to the test device.
17. The testing method for the image processing algorithm according to claim 14, characterized in that, The first image processing program and the second image processing program are at least one of an image preprocessing program, a de-mosaic processing program, a color curve correction processing program, a color correction processing program, an edge enhancement processing program, a scaling processing program, a color dithering processing program, and an image postprocessing program.
18. The testing method for the image processing algorithm according to claim 17, characterized in that, Step b) and step d) sequentially execute the image preprocessing procedure, the de-mosaicing procedure, the color curve correction procedure, the color correction procedure, the scaling procedure, and the color dithering procedure. Step e) executes the comparison procedure on the hardware-processed image and the software-processed image generated after each of the processing procedures, and generates the corresponding comparison results.
19. The testing method for the image processing algorithm according to claim 13, characterized in that, Step a) is either an external operation received by the human-machine interface of the image processing device to import the original image, or a sensing unit of the image processing device sensing an external environment to generate the original image.
Citation Information
Patent Citations
Dynamic property real-time monitoring system of railway turnout
CN104787085A
Method and system for providing a programmable logic device having a configurable wireless communication block field
US10833722B1
Image processing system providing selective arrangement and configuration for an image analysis sequence
US20130058524A1
Enhanced security for multiple node computing platform
US20190243953A1