Image data sampling method and device, electronic device, and storage medium

By capturing the rising edge of the effective data signal, determining the transmission start end of the image data and adjusting the data synchronization clock signal to the intermediate time point, the problem of inaccurate image data sampling by the FPGA chip when receiving the out-of-synchronous clock signal is solved, and high accuracy is achieved image data sampling.

CN112055128BActive Publication Date: 2024-11-05HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910492332.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-06
Publication Date
2024-11-05
Estimated Expiration
2039-06-06

AI Technical Summary

Technical Problem

When the FPGA chip receives data synchronization clock signal and image data are not synchronized, the image data sampling is inaccurate and pixel misalignment or errors occur.

Method used

The transmission start end of the image data is determined by grabbing the rising edge of the data valid signal, and the data synchronization clock signal is adjusted to an intermediate time point adapted to the data transmission cycle of the image data to ensure sampling at the adjusted rising edge of the clock.

Benefits of technology

This greatly improves the sampling accuracy of image data, avoids errors caused by interference, and ensures the accuracy of image display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112055128B_ABST
    Figure CN112055128B_ABST
Patent Text Reader

Abstract

The present application relates to an image data sampling method and device, the method comprising: receiving parallel data sent to an FPGA chip, the parallel data comprising a data synchronization clock signal, a data valid signal and image data; determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data; starting from the transmission start end, adjusting the rising edge of the data synchronization clock signal to a middle time point suitable for the data transmission cycle where the image data is located; when the adjusted data synchronization clock signal is a rising edge, sampling the image data in the received parallel data. The method provided by the present application can guarantee the accuracy of the sampled image data to a great extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information processing technology, and in particular to an image data sampling method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Medical displays are high-definition and high-brightness displays used in the medical industry. In the existing design of medical displays, in order to achieve high-definition and high-brightness display of images, SOC (System on Chip) circuit platforms are usually used to realize the function of converting images from small screens to large screens, and FPGA (Field Programmable Gate Array) chips are used to realize automatic correction and contrast enhancement of medical digital imaging and communication.

[0003] like Figure 1 As shown, the SOC circuit platform and the FPGA chip in the medical display are connected through an analog-to-digital conversion chip. The analog LVDS (Low Voltage Differential Signaling) signal sent from the SOC circuit platform is converted into five TTL (transistor-transistor logic) signals, including data synchronization clock signal (clk_data), data valid signal (de), field synchronization signal (vs), line synchronization signal (hs) and image data (rgb) by the analog-to-digital conversion chip and then output to the FPGA chip.

[0004] Inside the FPGA chip, image data is sampled according to the data synchronization clock signal to perform image processing on the sampled image data. However, since the above-mentioned TTL signals are transmitted in parallel, different TTL signals are subject to different degrees of interference from factors such as electromagnetic waves, resulting in the data synchronization clock signal and image data being out of sync, which can easily lead to problems such as image pixel misalignment or errors caused by inaccurate image data sampling. Summary of the invention

[0005] In order to solve the technical problem that the above-mentioned FPGA chip is prone to inaccurate image data sampling due to the asynchrony between the received data synchronization clock signal and the image data, the present application provides an image data sampling method and device, an electronic device, and a computer-readable storage medium, so that the FPGA chip can still accurately sample the image data when the data synchronization clock signal and the image data are not synchronized.

[0006] Among them, the technical solution adopted in this application is:

[0007] A method for sampling image data includes: receiving parallel data sent to an FPGA chip, the parallel data including a data synchronization clock signal, a data valid signal and image data; determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data; adjusting the rising edge of the data synchronization clock signal to a middle time point suitable for a data transmission cycle where the image data is located, starting from the transmission start end; and sampling the image data in the received parallel data when the adjusted data synchronization clock signal is at a rising edge.

[0008] In another exemplary embodiment, the parallel data is determined by capturing the rising edge of the data valid signal to determine the transmission starting end of the image data, including: when the rising edge of the data valid signal is captured, counting the data valid signal by determining the clock at the starting end; when the value of the clock determined at the starting end reaches a first preset value, obtaining the transmission time point of the data valid signal as the transmission starting end.

[0009] In another exemplary embodiment, starting from the transmission starting end, the rising edge of the data synchronization clock signal is adjusted to adapt to the middle time point of the data transmission cycle where the image data is located, including: starting from the time point corresponding to the transmission starting end, counting the data synchronization clock signal through the position adjustment clock; when the value of the position adjustment clock reaches a second preset value, adjusting the transmission state of the data synchronization clock signal to a rising edge, and the second preset value corresponds to the middle time point of any data transmission cycle in the transmission of the image data along the data transmission cycle.

[0010] In another exemplary embodiment, when the value of the position adjustment clock reaches a second preset value, the transmission state of the data synchronization clock signal is adjusted to a rising edge, including: when the value of the position adjustment clock reaches the second preset value, the data synchronization clock signal is switched to a high level; and the data synchronization clock signal is controlled to start with the high level and transmitted according to the original signal transmission cycle.

[0011] In another exemplary embodiment, before determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data, the method further includes: filtering the received image data to obtain filtered data, so that sampling of the filtered data is performed when the adjusted data synchronization clock signal is a rising edge.

[0012] In another exemplary embodiment, before determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data, the method further includes: outputting the image data after delaying the received image data for at least one data transmission cycle.

[0013] An image data sampling device comprises: a data receiving module for receiving parallel data sent to an FPGA chip, the parallel data comprising a data synchronization clock signal, a data valid signal and image data; a signal capture module for determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data; a signal adjustment module for adjusting the rising edge of the data synchronization clock signal to a middle time point of a data transmission cycle where the image data is located, starting from the transmission start end; and a data sampling module for sampling the image data in the received parallel data when the adjusted data synchronization clock signal is at a rising edge.

[0014] An electronic device includes a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the image data sampling method as described above is implemented.

[0015] A computer-readable storage medium stores a computer program, which implements the image data sampling method as described above when executed by a processor.

[0016] The technical solution adopted in this application has the following beneficial effects:

[0017] In the above technical solution, after receiving the parallel data sent to the FPGA chip, the rising edge of the data valid signal in the parallel data is first captured to determine the transmission starting end of the image data to avoid sampling invalid image data. Since the image data is least likely to be interfered with and erroneous at the middle time point of the corresponding data transmission cycle, the sampled image data has the highest accuracy. Therefore, by adjusting the rising edge of the data synchronization signal in the parallel data to adapt to the middle time point of the data transmission cycle where the image data is located, and sampling the image data when the data synchronization clock signal is a rising edge, the accuracy of the sampled image data can be guaranteed to a great extent.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application.

[0020] Figure 1 is a schematic diagram of the internal structure of a medical display according to an exemplary embodiment;

[0021] Figure 2 is a flow chart of an image data sampling method according to an exemplary embodiment;

[0022] Figure 3 yes Figure 2 A flowchart of step 130 in one embodiment corresponding to the embodiment;

[0023] Figure 4 is a timing diagram of image data sampling according to an exemplary embodiment;

[0024] Figure 5 yes Figure 2 A flowchart of an embodiment corresponding to step 150 in an embodiment;

[0025] Figure 6 is a timing diagram of image data sampling according to another exemplary embodiment;

[0026] Figure 7 yes Figure 5 A flowchart of step 153 in one embodiment corresponding to the embodiment;

[0027] Figure 8 is a schematic diagram of the internal structure of a medical display according to another exemplary embodiment;

[0028] Fig. 9 It is a block diagram of an image data sampling device according to an exemplary embodiment.

[0029] The above-mentioned drawings have shown clear embodiments of the present application, which will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0030] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0031] like Figure 1As shown, medical displays are usually equipped with a SOC circuit platform and an FPGA chip. The analog LVDS signal sent by the SOC circuit platform is converted into a data synchronization clock signal, a data valid signal, a field synchronization signal, a line synchronization signal and image data via an analog-to-digital conversion chip and input into the FPGA chip. The FPGA chip samples the image data according to the data synchronization clock signal and performs image processing on the sampled image data to achieve high-definition and high-brightness display of the image.

[0032] Since the data synchronization clock signal and the image data transmission are not synchronized, the FPGA chip cannot accurately sample the image data, which causes problems such as pixel misalignment or errors in the display of images by medical monitors.

[0033] In order to solve the image display problem caused by the inability of FPGA chips to accurately sample image data, such as Figure 2 As shown, in an exemplary embodiment, an image data sampling method is shown, which at least includes the following steps:

[0034] Step 110, receiving parallel data sent to the FPGA chip, the parallel data including a data synchronization clock signal, a data valid signal and image data.

[0035] First of all, it should be noted that the method described in this embodiment is applicable to Figure 1 The FPGA chip shown, according to the method described in this embodiment, the FPGA chip can accurately sample the image data sent by the analog-to-digital conversion chip.

[0036] It should also be noted that, in other application scenarios, the image data received by the FPGA chip may also be sent by other chips, and this embodiment does not limit this.

[0037] The parallel data sent to the FPGA chip means that the data information received by the FPGA chip is sent in a parallel transmission mode, such as the aforementioned TTL signal. It is precisely because of the parallel transmission of data information that the data information is susceptible to different degrees of interference during the transmission process, resulting in the problem of asynchrony between the data information.

[0038] In this embodiment, the parallel data sent to the FPGA chip includes at least a data synchronization clock signal, a data valid signal and image data. The image data is the image information to be processed and displayed; the data synchronization clock signal is the basis for performing image data sampling. When the data synchronization clock signal is at a rising edge, the FPGA chip performs sampling of the image data; the data valid signal is used to indicate whether the corresponding transmitted image data is valid. In this embodiment, when the data valid signal is at a high level, it indicates that the image data is valid.

[0039] Valid image data refers to the RGB signal transmitted by the image data. During the entire transmission process of the image data, RGB signals and blanking signals (including line blanking signals and field blanking signals) are transmitted together. Only the RGB signal is the target signal for executing image display. When the FPGA chip executes image data sampling, it only needs to sample the RGB signal.

[0040] It should be understood that Figure 1 In the application scenario shown, the parallel data sent to the FPGA chip also includes a field synchronization signal and a line synchronization signal. And because the data valid signal, field synchronization signal and line synchronization signal are all necessary information for the FPGA chip to process and display image data, the FPGA chip needs to sample the data valid signal, field synchronization signal and line synchronization signal at the same time when performing image data sampling.

[0041] Step 130 , determining the transmission start end of the image data by capturing the rising edge of the data valid signal of the parallel data.

[0042] The transmission start end of the image data refers to the time point at which the transmission of valid image data begins, that is, the time point at which the valid RGB signal in the image data is transmitted.

[0043] As mentioned above, the data valid signal can reflect the validity of the currently transmitted image data. When the data valid signal has a rising edge, it means that the data valid signal switches from a low level to a high level. The image data received by the FPGA chip at this time is valid. Therefore, the time point when the data valid signal is at a rising edge is used as the starting point of the image data transmission.

[0044] By capturing the rising edge of the data valid signal, when the rising edge of the data valid signal is captured, it indicates that the received image data is valid, and thus the current time point is determined as the transmission start end of the image data.

[0045] Step 150, starting from the transmission start end, adjust the rising edge of the data synchronization clock signal to a middle time point suitable for the data transmission cycle where the image data is located.

[0046] In the transmission of parallel data, the data synchronization clock signal and the image data are theoretically transmitted synchronously, and the signal transmission period of the data synchronization clock signal and the data transmission period of the image data are theoretically identical.

[0047] However, due to different degrees of interference during transmission, the signal transmission period of the data synchronization clock signal is not synchronized with the data transmission period of the image data, resulting in the rising edge of the data synchronization clock signal not being able to completely correspond to the data transmission period of the image data, thereby causing the FPGA chip to be unable to accurately sample the image data. Therefore, it is necessary to adjust the rising edge position of the data synchronization clock signal.

[0048] And because the possibility of image data being interfered with and erroneous at the middle time point of the corresponding data transmission cycle is the smallest, the accuracy of image data sampling is the highest at this time. Therefore, adjusting the rising edge of the data synchronization clock signal to adapt to the middle time point of the data transmission cycle where the image data is located can greatly ensure the accuracy of image data sampling.

[0049] After determining the transmission starting point of the image data in step 130, since the transmitted image data is valid, starting from the transmission starting point, the rising edge of the data synchronization clock signal is adjusted to the middle time point of the data transmission cycle where the image data is located, so that the FPGA chip executes the sampling of the image data according to the rising edge of the adjusted data synchronization clock signal, which can ensure the validity and accuracy of the sampled image data at the same time.

[0050] Step 170: When the adjusted data synchronization clock signal is at a rising edge, sample the image data in the received parallel data.

[0051] Therefore, in this embodiment, after the FPGA chip receives the parallel data, it first captures the rising edge of the data valid signal in the parallel data to determine the starting end of the image data transmission, thereby avoiding sampling invalid image data, and can accurately sample the image data according to the rising edge of the adjusted data synchronization clock signal, thereby ensuring the validity and accuracy of the sampled image data to a great extent, and there will be no pixel misalignment or error problems in the display of the sampled image data.

[0052] Figure 3 yes Figure 2 The corresponding embodiment is a flowchart of step 130 in an embodiment. Figure 3 As shown, in an exemplary embodiment, the process of determining the transmission start end of the image data by capturing the rising edge of the data valid signal at least includes the following steps:

[0053] Step 131, when the rising edge of the data valid signal is captured, the data valid signal is counted by determining the clock at the start end.

[0054] When the image data is transmitted according to the set data transmission cycle, it may be interfered to varying degrees in each data transmission cycle, thereby affecting the validity of the image data and causing the transmission start end determined by capturing the rising edge of the data valid signal to be inaccurate.

[0055] like Figure 4 As shown, when the data valid signal is a rising edge, the valid image data is periodically transmitted starting from the time point corresponding to the rising edge. Figure 4 In the data transmission cycle shown, the image data is more likely to be interfered with during transmission before and after the middle time point, and is most likely to be interfered with at the beginning and end of the data transmission cycle, which can easily cause the image data to fail, while the possibility of being interfered with at the middle time point is the smallest.

[0056] In order to accurately locate the transmission start end of the image data, when the rising edge of the data valid signal is captured, the data valid signal is counted by the start end determination clock whose frequency is several times higher than the image data transmission frequency. When the value of the start end determination clock corresponds to the image data in the data transmission cycle where the possibility of interference is small, the corresponding time point is determined as the transmission start end of the image data. Since the image data is less likely to be interfered with, the possibility of image data validity being affected is also small, and the determined transmission start end is more accurate.

[0057] In such Figure 4 In the embodiment shown, the starting end determines that the clock is a clock with a frequency 10 times the image data transmission frequency. The starting end determines that the clock starts counting when valid image data starts to be transmitted. When its value is 10, the image data completes the transmission of one data transmission cycle and continues to transmit the next data transmission cycle. At this time, the starting end determines that the clock continues to count based on the current value, or it can clear the current value and re-execute the 1-10 counting process. There is no restriction here.

[0058] When the clock is determined to be other frequencies at the starting end, the counting process performed on the data valid signal is the same and will not be described in detail here.

[0059] Step 133, when the starting end determines that the value of the clock reaches a first preset value, the transmission time point at which the data valid signal is obtained is the transmission starting end.

[0060] The fact that the value of the clock determined by the starting end reaches the first preset value means that the interference degree of the image data in the transmission at the time point corresponding to the first preset value is small or minimal.

[0061] For example, in Figure 4In the illustrated embodiment, the frequency of the clock determined by the starting end is 10 times the frequency of image data transmission, and the first preset value is set to 5. When the value of the clock determined by the starting end reaches 5, it indicates that the image data is transmitted to the position of the middle time point of the current data transmission cycle. At this time, the possibility of image data being interfered with is the smallest, the degree of effect on the validity of image data is also the smallest, and the possibility of current image data being valid data is the largest. At this time, the transmission time point at which the data valid signal is obtained is the highest accuracy of the transmission starting end.

[0062] It should be noted that in certain special cases, such as when the transmission of the data valid signal and the image data are not synchronized, the transmission of the image data when the data valid signal is on the rising edge does not correspond to the starting end of the data transmission cycle, resulting in the image data not being transmitted to the middle time point of the data transmission cycle when the starting end determines that the clock count is 5. In this case, the first preset value needs to be adjusted to correspond to the middle time point of the data transmission cycle.

[0063] The adjustment of the first preset value usually needs to be determined manually based on the test results, which will not be described here.

[0064] In another embodiment, the first preset value may be other set values ​​(for example, 4). In this case, although the possibility of image data being interfered with is higher, when the interference with the image data does not affect its validity, the transmission starting end determined according to the set value is still accurate.

[0065] Figure 5 yes Figure 2 The corresponding embodiment is a flowchart of step 150 in an embodiment. Figure 5 As shown, in an exemplary embodiment, the process of adjusting the rising edge of the data synchronization clock includes at least the following steps:

[0066] Step 151, starting from the time point corresponding to the transmission start end, the data synchronization clock signal is counted by the position adjustment clock.

[0067] First, it should be noted that in this embodiment, the data synchronization clock signal received by the FPGA chip is referred to as the original data synchronization signal, and the data synchronization clock signal after the rising edge position is adjusted is referred to as the adjusted data synchronization clock signal.

[0068] like Figure 6As shown in the figure, the rising edge position of the original data synchronization clock signal does not correspond to the middle time point of the data transmission cycle where the image data is located, but corresponds to the end of the data transmission cycle or other positions. At this time, the image data is more likely to be interfered with and erroneous, and the image data cannot be accurately sampled. Therefore, it is necessary to adjust the rising edge position of the data synchronization clock signal to accurately sample the image data according to the adjusted rising edge.

[0069] The position adjustment clock is also a clock whose frequency is several times higher than the image data sending frequency. In an exemplary embodiment, the frequency of the position adjustment clock is the same as the clock determined by the starting end, while in other embodiments, the frequency of the position adjustment clock may also be different from the clock determined by the starting end. This is not limited here.

[0070] Step 153, when the value of the position adjustment clock reaches a second preset value, the transmission state of the data synchronization clock signal is adjusted to a rising edge, and the second preset value corresponds to the middle time point of any data transmission cycle during the transmission of the image data along the data transmission cycle.

[0071] The position adjustment clock reaching the second preset value means that the image data is least likely to be disturbed or erroneous during transmission at the time point corresponding to the second preset value, that is, the image data is transmitted to the position at the middle time point of the corresponding data transmission cycle.

[0072] Therefore, when the value of the position adjustment clock reaches the second preset value, the image data is transmitted to the position corresponding to the middle time point of the data transmission cycle, and the possibility of the image data being disturbed and erroneous during transmission is minimized. If the data synchronization clock is adjusted to the rising edge position at this time, the FPGA chip is triggered accordingly to execute sampling of the image data, thereby ensuring the accuracy of the sampled image data.

[0073] When the transmission start end of the image data is obtained according to the start end determination clock, the position adjustment clock starts counting, and the start end determination clock does not stop counting. During the transmission of the image data along with the data transmission cycle, the middle time point of a certain data transmission cycle in which the image data is located is still determined by the value of the start end determination clock, and the value of the position adjustment clock is correspondingly obtained when the middle time point is determined, and the value is the second preset value.

[0074] It should be noted that the data transmission period corresponding to the time point indicated by the second preset value may be several periods after the data transmission period corresponding to the transmission start end of the image data. Figure 6 In the embodiment, the transmission start end of the image data corresponds to data transmission cycle 2, and the second preset value corresponds to data transmission cycle 3.

[0075] The following will Figure 6The example describes in detail the adjustment process of the rising edge of the data synchronization clock signal:

[0076] like Figure 6 As shown, the frequencies of the position adjustment clock and the starting end determination clock are both 10 times the image data sending frequency. When the value of the starting end determination clock reaches 5, the image data is transmitted to the middle time point of data transmission cycle 2. At this time, the corresponding time point is determined as the transmission starting end of the image data, and the position adjustment clock starts counting.

[0077] When the clock value determined at the starting end reaches 15, the image data is transmitted to the middle time point of data transmission cycle 3, and the position adjustment clock value is 8 (that is, the second preset value is 8). At this time, the transmission state of the data synchronization clock signal is adjusted to the rising edge.

[0078] It should be understood that if the starting end determines that the clock count reaches 10 and then starts counting again from zero, then when the value of the starting end determines that the clock reaches 5 again, the corresponding value of the position adjustment clock is set to the second preset value. Figure 6 The corresponding value of the middle time point of the data transmission cycle 4 or other data transmission cycles is determined as the second preset value, which is not limited here.

[0079] It should also be understood that, similar to the aforementioned first preset value, the size of the second preset value also depends on manual adjustment based on the test results.

[0080] In another exemplary embodiment, Figure 7 As shown, when the value of the position adjustment clock reaches the second preset value, the process of adjusting the transmission state of the data synchronization clock signal to a rising edge includes at least the following steps:

[0081] Step 1531, when the value of the position adjustment clock reaches a second preset value, the data synchronization clock signal is switched to a high level.

[0082] Among them, please refer to 6. When the value of the position adjustment clock reaches the second preset value, the transmission state of the original data synchronization clock signal is a low level. By switching the low level to a high level, a rising edge can be generated at the time point corresponding to the second preset value.

[0083] Step 1533, control the data synchronization clock signal to start with a high level and transmit according to the original signal transmission cycle.

[0084] Here, based on the fact that the data synchronization clock signal and the image data have the same transmission frequency, the original signal transmission period of the data synchronization clock signal should also correspond to the data transmission period of the image data.

[0085] In the continuous transmission of the data synchronization clock signal and the image data, by controlling the data synchronization clock signal to start with the switched high level and transmitting according to the original signal transmission cycle, it can be ensured that the rising edge position of the data synchronization clock signal corresponds to the middle time point of the data transmission cycle of the image data.

[0086] Therefore, for the image data sampled by the FPGA chip according to the rising edge of the adjusted data synchronization clock signal, the possibility of interference and error during the transmission of the image data is minimal, so that the image data sampled by the FPGA chip is accurate.

[0087] In another exemplary embodiment, before step 130, the image data sampling method further includes the following steps:

[0088] The image data is filtered to obtain filtered data, so that the FPGA chip samples the filtered data when the adjusted data synchronization clock signal is at a rising edge.

[0089] In the process of sending the image data to the FPGA chip, due to interference, it is easy to produce jitter or burrs, resulting in unstable image data, which will also affect the accuracy of the image data sampled by the FPGA chip. Therefore, it is necessary to filter the image data first to filter out unstable factors such as burrs to obtain filtered data, and then sample the filtered data. The above-mentioned jitter or burr refers to some waveforms in the transmission waveform of the image data whose period is less than the data transmission period.

[0090] Filtering the image data is a process of resampling the image data using a clock with a frequency higher than the image data transmission frequency. For example, after the FPGA chip receives the image data, it resamples the image data using a clock with a frequency 10 times higher than the image data transmission frequency to filter jitter or glitches in the image data.

[0091] It should be noted that in some application scenarios, the FPGA chip must rely on necessary information such as data valid signals, line synchronization signals, and field synchronization signals to process and display image data, so the FPGA chip also needs to filter these necessary information.

[0092] Therefore, this embodiment further ensures the accuracy of the image data sampled by the FPGA chip by first filtering the image data and then sampling the filtered image data.

[0093] In another exemplary embodiment, before step 130, the image data sampling method further includes the following steps:

[0094] The received image data is outputted after being delayed for at least one data transmission cycle.

[0095] Before the image data is delayed for at least one data transmission cycle, the transmission process of the image data received by the FPGA chip is as follows: Figure 4 As shown in the figure, it can be seen that the image data transmitted corresponding to data transmission cycle 2 is the first valid image data 1, where the gray area indicates the validity of the image data. After delaying the image data for one data transmission cycle, the image data output by the FPGA chip is as follows Figure 6 As shown, the image data 1 is arranged to be transmitted via a data transmission cycle 3 .

[0096] Since the process of capturing the rising edge of the data valid signal to determine the starting point of image data transmission will occupy at least one data transmission cycle of the image data, if the image data is not delayed, that is, the FPGA chip directly samples the received image data according to the rising edge of the adjusted data synchronization clock signal, the FPGA chip will miss sampling of the first valid image data, resulting in the lack of corresponding pixels in the final displayed image.

[0097] For ease of understanding, Figure 6 As shown, the time point when the FPGA chip performs image data sampling according to the rising edge of the adjusted data synchronization clock signal corresponds to data transmission cycle 3. By delaying the image data for one data transmission cycle, the original first valid image data 1 is adjusted to be transmitted via data transmission cycle 3. The FPGA chip starts sampling the image data from the first valid image data 1, thereby avoiding the problem of image data leakage sampling.

[0098] It should be noted that the FPGA chip may also delay the image data for any number of data transmission cycles before outputting it, and this embodiment does not limit this.

[0099] Furthermore, by adjusting the size of the second preset value, it is still possible to ensure that the FPGA chip starts sampling from the first valid image data. Figure 6 As shown, if the FPGA chip outputs the image data after delaying 2 data transmission cycles, it is only necessary to adjust the transmission state of the data synchronization clock signal to the rising edge when the position adjustment clock counts to 8 for the second time.

[0100] It should also be noted that when the FPGA chip must rely on necessary information such as data valid signals, line synchronization signals, and field synchronization signals to process and display image data, in order to ensure the synchronization between these necessary information and the image data, the FPGA chip should simultaneously delay the same data transmission period before performing sampling on these necessary information.

[0101] The image sampling method in the above embodiment will be described in detail below in combination with the application scenario of a medical display. Figure 8 As shown, after the medical display is powered on, the SOC circuit platform, the analog-to-digital conversion chip and the FPGA chip load the corresponding program for initialization. The SOC circuit platform sends the LVDS signal to the analog-to-digital conversion chip, and the analog-to-digital conversion chip converts the LVDS signal into a TTL signal and sends it to the FPGA chip, wherein the analog-to-digital conversion chip sends the data synchronization clock signal to the PLL (Phase Locked Loop) inside the FPGA chip via a special pin. After other TTL signals are sent to the FPGA chip, they are first filtered to remove unstable factors such as jitter or burrs, and delay a data transmission cycle. The transmission start end of the image data is determined by capturing the rising edge of the valid data signal before filtering, and then the rising edge position of the data synchronization clock signal is adjusted according to the transmission start end, and the image data and other TTL signals are sampled according to the rising edge of the adjusted data synchronization clock signal, thereby accurately sampling the image data sent by the SOC circuit platform. The medical display will not have pixel errors or errors in the display of the image data sampled by the FPGA chip.

[0102] Fig. 9 is a block diagram of an image data sampling device according to an exemplary embodiment. The image data sampling device is suitable for Figure 1 The FPGA chip shown. Fig. 9 As shown, in an exemplary embodiment, the image data sampling device includes a data receiving module 210 , a signal capturing module 230 , a signal adjusting module 250 and a data sampling module 270 .

[0103] The data receiving module 210 is used to receive parallel data sent to the FPGA chip, where the parallel data includes a data synchronization clock signal, a data valid signal and image data.

[0104] The signal capture module 230 is used to determine the transmission start end of the image data by capturing the rising edge of the data valid signal of the parallel data.

[0105] The signal adjustment module 250 is used to adjust the rising edge of the data synchronization clock signal to a middle time point of the data transmission cycle where the image data is located, starting from the transmission start end.

[0106] The data sampling module 270 is used to perform sampling on the image data in the received parallel data when the adjusted data synchronization clock signal is at a rising edge.

[0107] In another exemplary embodiment, the signal capture module 230 includes a first counting unit and a starting end acquisition unit.

[0108] The first counting unit is used for counting the data valid signal through the starting end determining clock when the rising edge of the data valid signal is captured.

[0109] The starting end acquisition unit is used to acquire the transmission time point at which the data valid signal is located as the transmission starting end when the value of the clock determined at the starting end reaches a first preset value.

[0110] In another exemplary embodiment, the signal adjustment module 250 includes a second counting unit and a position adjustment unit.

[0111] The second counting unit is used to count the data synchronization clock signal by adjusting the clock position starting from the time point corresponding to the transmission start end.

[0112] The position adjustment unit is used to adjust the transmission state of the data synchronization clock signal to a rising edge when the value of the position adjustment clock reaches a second preset value, and the second preset value corresponds to the middle time point of any data transmission cycle during the transmission of the image data along the data transmission cycle.

[0113] In another exemplary embodiment, the position adjustment unit includes a level switching subunit and a signal transmission control subunit.

[0114] The level switching subunit is used to switch the data synchronization clock signal to a high level when the value of the position adjustment clock reaches a second preset value.

[0115] The signal transmission control subunit is used to control the data synchronization clock signal to start with the switched high level and to transmit according to the original signal transmission cycle.

[0116] In another exemplary embodiment, the image data sampling device further includes a data filtering module for filtering and sampling the image data in the received parallel data to obtain filtered data, so that the data sampling module performs sampling of the filtered data when the adjusted data synchronization clock signal is at a rising edge.

[0117] In another exemplary embodiment, the image data sampling device further includes a data delay module. The data delay module is used to output the received image data after delaying it by at least one data transmission cycle.

[0118] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.

[0119] In one exemplary embodiment, an electronic device includes:

[0120] processor; and

[0121] A memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the image data sampling method in the above-mentioned embodiments is implemented.

[0122] In an exemplary embodiment, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the image data sampling method in the above-mentioned embodiments.

[0123] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A method for sampling image data, characterized in that: include: Receiving parallel data sent to the FPGA chip, the parallel data including a data synchronization clock signal, a data valid signal and image data; When the rising edge of the data valid signal is captured, the data valid signal is counted by a starting end determination clock whose frequency is several times higher than the image data transmission frequency; wherein, when the data valid signal is a rising edge, the valid image data is periodically transmitted starting from the time point corresponding to the rising edge; When the value of the clock determined at the starting end reaches a first preset value, the transmission time point at which the data valid signal is obtained is the transmission starting end of the image data, and the time point corresponding to the first preset value represents the position of the image data transmitted to the middle time point of the current data transmission cycle; Starting from the time point corresponding to the transmission start end, the data synchronization clock signal is counted by a position adjustment clock having a frequency several times higher than the image data transmission frequency; When the value of the position adjustment clock reaches a second preset value, the transmission state of the data synchronization clock signal is adjusted to a rising edge, and the second preset value corresponds to a middle time point of any data transmission cycle during the transmission of the image data along the data transmission cycle; When the adjusted data synchronization clock signal is at a rising edge, the image data in the received parallel data is sampled.

2. The method according to claim 1, characterized in that: When the value of the position adjustment clock reaches a second preset value, adjusting the transmission state of the data synchronization clock signal to a rising edge includes: When the value of the position adjustment clock reaches the second preset value, switching the data synchronization clock signal to a high level; The data synchronization clock signal is controlled to start with the high level and is transmitted according to the original signal transmission cycle.

3. The method according to claim 1, characterized in that Before determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data, the method further includes: The received image data is filtered to obtain filtered data, so that the filtered data is sampled when the adjusted data synchronization clock signal is at a rising edge.

4. The method according to claim 1, characterized in that: Before determining the transmission start end of the image data by capturing the rising edge of the data valid signal for the parallel data, the method further includes: The output of the image data is performed after delaying the received image data for at least one data transmission cycle.

5. An image data sampling device, characterized in that: include: A data receiving module, used for receiving parallel data sent to the FPGA chip, wherein the parallel data includes a data synchronization clock signal, a data valid signal and image data; A signal capture module is used to, when capturing the rising edge of the data valid signal, count the data valid signal through a starting end determination clock whose frequency is several times higher than the image data transmission frequency; wherein, when the data valid signal is a rising edge, valid image data is periodically transmitted starting from the time point corresponding to the rising edge; when the value of the starting end determination clock reaches a first preset value, the transmission time point at which the data valid signal is located is obtained as the transmission starting end of the image data, and the time point corresponding to the first preset value indicates the position of the image data transmission to the middle time point of the current data transmission cycle; a signal adjustment module, configured to count the data synchronization clock signal starting from the time point corresponding to the transmission start end through a position adjustment clock having a frequency several times higher than the image data transmission frequency; and adjust the transmission state of the data synchronization clock signal to a rising edge when the value of the position adjustment clock reaches a second preset value, wherein the second preset value corresponds to a middle time point of any data transmission cycle in the transmission of the image data along the data transmission cycle; The data sampling module is used to perform sampling on the image data in the received parallel data when the adjusted data synchronization clock signal is at a rising edge.

6. The device according to claim 5, characterized in that The device also includes: The data filtering module is used to filter and sample the image data in the received parallel data to obtain filtered data, so that the data sampling module performs sampling of the filtered data when the adjusted data synchronization clock signal is at a rising edge.

7. An electronic device, characterized in that: include: processor; and a memory for storing executable instructions for the processor; The processor is configured to perform the method of any one of claims 1 to 4 by executing the executable instructions.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.