CN116743890A - Clock frequency determining method, device, acquisition card and system - Google Patents

Clock frequency determining method, device, acquisition card and system Download PDF

Info

Publication number
CN116743890A
CN116743890A CN202310709965.7A CN202310709965A CN116743890A CN 116743890 A CN116743890 A CN 116743890A CN 202310709965 A CN202310709965 A CN 202310709965A CN 116743890 A CN116743890 A CN 116743890A
Authority
CN
China
Prior art keywords
clock
frequency
timing
determining
acquisition card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310709965.7A
Other languages
Chinese (zh)
Inventor
周长生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luster LightTech Co Ltd
Original Assignee
Luster LightTech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN202310709965.7A priority Critical patent/CN116743890A/en
Publication of CN116743890A publication Critical patent/CN116743890A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The embodiment of the application provides a clock frequency determining method, a device, an acquisition card and a system, wherein the method is applied to the acquisition card, the acquisition card comprises a first clock and a second clock, the method triggers the first clock and the second clock to time simultaneously in the process that the acquisition card acquires first image data from a first imaging device, the first clock is timed through a first frequency, the second clock is timed through a second frequency, and the second frequency is the frequency for acquiring the first image data from the first imaging device; determining the number relation between a first timing period of a first clock and a second timing period of a second clock in the same timing duration; based on the quantitative relationship and the first frequency, a second frequency is determined, the second frequency being a clock frequency of the first imaging device. The clock frequency of the imaging device can be determined by the application, and the imaging device and the upper computer are not required to be connected, so that the manual operation for connecting the imaging device and the upper computer can be reduced, the implementation mode is simpler and the time consumption is shorter.

Description

Clock frequency determining method, device, acquisition card and system
Technical Field
The present application relates to the field of machine vision, and in particular, to a clock frequency determining method, device, acquisition card, and system.
Background
The image acquisition card can be simply called as an acquisition card and is used for acquiring an image shot by the imaging device and transmitting the acquired image to the computer for the computer to store, process, display and the like the received image. With the development of machine vision technology, the application of an image acquisition card is increasingly wide, for example, in some application scenes, an imaging device can shoot a workpiece to be detected to acquire an image containing the workpiece to be detected, and after the acquisition card acquires the image from the imaging device, the image is transmitted to an upper computer so that the upper computer can determine whether the workpiece to be detected has defects or not through processing the image.
When the acquisition card acquires an image shot by the imaging device, the acquisition card generally acquires and uploads image data according to the clock frequency of the image shot by the imaging device, so that the acquisition card needs to determine the clock frequency of the imaging device. Referring to the schematic diagram of the scenario shown in fig. 1, when determining the clock frequency of the imaging device, a technician connects the imaging device and the upper computer through a serial port at first, and then the upper computer reads the clock frequency of the imaging device through the serial port and transmits the read clock frequency to the acquisition card, so that the acquisition card acquires the clock frequency of the imaging device.
However, in this method, the operation of connecting the imaging device and the host computer through the serial port needs to be manually performed, which is cumbersome and takes a long time, resulting in low efficiency of determining the clock frequency of the imaging device.
Disclosure of Invention
The application provides a clock frequency determining method, a clock frequency determining device, an acquisition card and a clock frequency determining system, which are used for determining the clock frequency of an imaging device so as to solve the problems of complex operation and long time consumption when the clock frequency of the imaging device is determined by the prior art.
In a first aspect, an embodiment of the present application provides a clock frequency determining method, which is applied to an acquisition card, where the acquisition card includes a first clock and a second clock, and the method includes:
triggering the first clock and the second clock to time simultaneously in the process of acquiring first image data from a first imaging device by the acquisition card, wherein the first clock is used for timing through a preset first frequency, and the second clock is used for timing through a second frequency, and the second frequency is the frequency of acquiring the first image data from the first imaging device by the acquisition card;
determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within the same timing period;
The second frequency is determined based on the first frequency and a quantitative relationship between the first timing period and the second timing period, the second frequency being a clock frequency of the first imaging device.
In an alternative design, the determining the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock within the same timing period includes:
drawing a first time sequence signal corresponding to the first clock and a second time sequence signal corresponding to the second clock in the process of timing of the first clock and the second clock;
determining a first number and a second number within the same timing duration, the first number being the number of the first timing periods included in the first timing signal and the second number being the number of the second timing periods included in the second timing signal;
calculating a ratio of the first number to the second number within the same timing duration, the ratio being used to characterize a number relationship between the first timing period and the second timing period.
In an alternative design, the determining the second frequency of the second clock includes:
Determining a correspondence between the first frequency and the second frequency based on a quantitative relationship between the first timing period and the second timing period;
and determining a second frequency of the second clock based on the correspondence and the first frequency.
In an alternative design, the method further comprises:
before determining the second frequency of the second clock, transmitting the first image data to an upper computer through a preset transmission frequency of the acquisition card;
after determining a second frequency of the second clock, transmitting the first image data to the upper computer through the second frequency.
In an alternative design, if the second frequency of the second clock is determined periodically, the preset transmission frequency of the acquisition card is the frequency determined according to the previously received setting operation in the period of first determining the second frequency;
and in other periods for determining the second frequency, the preset transmission frequency of the acquisition card is the second frequency of the second clock determined in the previous period.
In an alternative design, before determining the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock, the method further comprises:
Triggering the first clock and the second clock to time simultaneously in the process of acquiring second image data from a second imaging device by the acquisition card, wherein the first clock is used for timing through the first frequency, and the second clock is used for timing through the frequency of acquiring the second image data by the acquisition card;
after the first clock and the second clock are clocked for a plurality of times, determining the number relation between a third timing period of the first clock and a fourth timing period of the second clock, which are obtained by each time, wherein the timing duration of each time is different;
determining a third frequency of acquiring the second image data by the second clock obtained by each time based on the number relation between the third time period and the fourth time period obtained by each time and the first frequency;
calculating a difference between the third frequency obtained by each time of timing and the clock frequency of the second imaging device;
and determining a target time length based on the difference value, wherein the target time length is the shortest time length in the timing time lengths corresponding to the difference value in a preset range.
In an alternative design, the determining the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock includes:
And when the timing duration of the first clock and the second clock reaches the target duration, determining the quantity relation between the first timing period of the first clock and the second timing period of the second clock in the target duration.
In a second aspect, an embodiment of the present application provides a clock frequency determining apparatus applied to an acquisition card, where the acquisition card includes a first clock and a second clock, the apparatus includes:
the triggering module is used for triggering the first clock and the second clock to time simultaneously in the process of acquiring first image data from the first imaging device by the acquisition card, wherein the first clock is used for timing through a preset first frequency, and the second clock is used for timing through a second frequency, and the second frequency is the frequency of acquiring the first image data from the first imaging device by the acquisition card;
the relation determining module is used for determining the quantity relation between the first timing period of the first clock and the second timing period of the second clock in the same timing duration;
and the frequency determining module is used for determining the second frequency based on the number relation between the first timing period and the second timing period and the first frequency, wherein the second frequency is the clock frequency of the first imaging device.
In a third aspect, an embodiment of the present application provides an acquisition card, including:
a first clock and a second clock;
a memory storing a computer program and a processor implementing the method according to the first aspect when the processor executes the computer program.
In a fourth aspect, an embodiment of the present application provides a clock frequency determining system, including:
a first imaging device for capturing first image data;
the acquisition card of the third aspect.
The clock frequency determining method of the embodiment of the application can determine the clock frequency of the imaging device, and can be realized by the acquisition card without connecting the imaging device with an upper computer, so compared with the prior art, the method reduces the manual operation for connecting the imaging device with the upper computer, has simpler realization mode, correspondingly reduces the time required for determining the clock frequency of the imaging device, and improves the efficiency for determining the clock frequency of the imaging device.
Furthermore, the method provided by the embodiment of the application can improve the efficiency of the acquisition card in determining the clock frequency of the imaging device, and can ensure the imaging effect of the upper computer when the acquisition card transmits the image data to the upper computer through the clock frequency of the imaging device, so that the method provided by the embodiment of the application is also beneficial to improving the imaging effect of the upper computer.
Drawings
FIG. 1 is a schematic diagram of an application scenario for determining a clock frequency of an imaging device;
fig. 2 is a schematic diagram of an application scenario for determining a clock frequency of an imaging device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a workflow for determining a clock frequency of an imaging device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of timing signals in a method for determining clock frequency of an imaging device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a workflow for determining a clock frequency of an imaging device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a workflow for determining a clock frequency of an imaging device according to an embodiment of the present application;
fig. 7 is a schematic diagram of a structure for determining a clock frequency of an imaging apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an acquisition card according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, embodiments and advantages of the present application more apparent, an exemplary embodiment of the present application will be described more fully hereinafter with reference to the accompanying drawings in which exemplary embodiments of the application are shown, it being understood that the exemplary embodiments described are merely some, but not all, of the examples of the application.
It should be noted that the brief description of the terminology in the present application is for the purpose of facilitating understanding of the embodiments described below only and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms first, second, third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
In capturing an image, the imaging device generates image data according to its own clock frequency. In addition, the acquisition card acquires image data from the imaging device and transmits the acquired image data to the upper computer so that the upper computer obtains a corresponding image based on the received image data. In the process, if the acquisition card acquires and uploads the image data according to the clock frequency of the imaging device, the upper computer can obtain an image with a good imaging effect, and if the frequency of uploading the image data by the acquisition card is different from the clock frequency of the imaging device, the imaging effect of the image obtained by the upper computer is usually poor.
For example, if the frequency of uploading the image data by the acquisition card is greater than the clock frequency of the imaging device, an area where different image data overlap may occur in the image obtained by the upper computer; if the frequency of uploading the image data by the acquisition card is smaller than the clock frequency of the imaging device, a blank area without the image data may appear in the image obtained by the upper computer.
Therefore, in order to secure the imaging effect of the image, the acquisition card generally needs to determine the clock frequency of the imaging device and transmit the image data to the upper computer according to the clock frequency of the imaging device.
Aiming at the situation, the application provides a clock frequency determining method, a clock frequency determining device, an acquisition card and a clock frequency determining system, which are used for determining the clock frequency of an imaging device and can solve the problems of complex operation and long time consumption in the prior art.
Referring to the schematic view of the scenario shown in fig. 2, the clock frequency determining method provided by the application is applied to an acquisition card, and the acquisition card is connected with an imaging device, and the acquisition card acquires image data in the imaging device through connection with the imaging device, wherein the connection can be a camellink connection.
In addition, the acquisition card comprises a first clock and a second clock, and the first clock and the second clock can be clocked through different frequencies.
Referring to the workflow diagram shown in fig. 3, the clock frequency determining method disclosed in the embodiment of the application comprises the following steps:
step S11, triggering the first clock and the second clock to time simultaneously in the process of collecting the first image data from the first imaging device by the collecting card.
The first clock is used for timing through a preset first frequency, the second clock is used for timing through a second frequency, and the second frequency is used for acquiring first image data from the first imaging device through the acquisition card.
Step S12, determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within the same timing period.
Wherein the quantitative relationship may be embodied by a ratio between a number of first timing cycles and a number of second timing cycles of the first clock within the timing duration.
Step S13, determining a second frequency based on the number relation between the first timing period and the second timing period and the first frequency, wherein the second frequency is the clock frequency of the first imaging device.
The number relationship between the first timing period and the second timing period can reflect the magnitude relationship between the first frequency and the second frequency within the same timing duration. In addition, in the embodiment of the present application, the first frequency is a preset frequency, that is, the first frequency is a known frequency. Therefore, in the embodiment of the present application, the second frequency can be determined according to the number relationship and the first frequency, where the second frequency is the clock frequency of the first imaging device.
The embodiment of the application provides a clock frequency determining method, which is executed by an acquisition card, wherein the acquisition card comprises a first clock and a second clock. In the method, in the process of acquiring first image data from a first imaging device by an acquisition card, a first clock and a second clock are triggered to time at the same time, the timing frequency of the first clock is a preset first frequency, the timing frequency of the second clock is a second frequency, and the second frequency is the frequency of the acquisition card for acquiring the first image data from the first imaging device, namely the second frequency can be used as the clock frequency of the first imaging device; then, a quantitative relation between a first timing period of the first clock and a second timing period of the second clock within the same timing period is determined, and a second frequency is determined based on the quantitative relation and the known first frequency, so that the clock frequency of the first imaging device is determined.
The method of the embodiment of the application can determine the clock frequency of the imaging device, and can be realized by the acquisition card without connecting the imaging device with an upper computer, so compared with the prior art, the method reduces the manual operation for connecting the imaging device with the upper computer, has simpler realization mode, correspondingly reduces the time for determining the clock frequency of the imaging device, and improves the efficiency for determining the clock frequency of the imaging device.
Furthermore, the method provided by the embodiment of the application can improve the efficiency of the acquisition card in determining the clock frequency of the imaging device, and can ensure the imaging effect of the upper computer when the acquisition card transmits the image data to the upper computer through the clock frequency of the imaging device, so that the method provided by the embodiment of the application is also beneficial to improving the imaging effect of the upper computer.
In step S12 of the present application, an operation of determining a quantitative relationship between a first timing period of a first clock and a second timing period of a second clock within the same timing period is provided. This operation may be accomplished by:
first, in the process of timing the first clock and the second clock, the first timing signal corresponding to the first clock and the second timing signal corresponding to the second clock are drawn.
In the process of drawing the first timing signal, adding a corresponding signal period for the first timing signal every time a first timing period passes; in the process of drawing the second time sequence signal, a corresponding signal period is added for the second time sequence signal every time a second timing period passes.
Then, a first number and a second number within the same timing duration are determined, the first number being a number of first timing periods included in the first timing signal, and the second number being a number of second timing periods included in the second timing signal.
In order to clarify the scheme provided by the present application, an exemplary diagram of the timing signals is provided below. Referring to fig. 4, in an exemplary diagram of the timing signals, the upper timing signal is a first timing signal, and the lower timing signal is a second timing signal. Wherein x marked on the first timing signal is a first timing period, x=0 represents a 0 th first timing period, x=1 represents a 1 st first timing period, and x=n represents an nth first timing period; y marked on the second timing signal is a second timing period, y=0 represents a 0 th second timing period, y=1 represents a 1 st second timing period, and y=m represents an m-th second timing period.
Finally, the ratio of the first number to the second number is calculated within the same timing duration.
For example, referring to fig. 4, in the same timing duration, the number of the first timing periods is n, the number of the second timing periods is m, and then the ratio of the number of the first timing periods to the number of the second timing periods is n/m, and accordingly, the number relationship between the first timing periods and the second timing periods is n/m.
Through the operation of the embodiment of the application, in the process of timing of the first clock and the second clock, corresponding first timing signals are respectively drawn for the first clock, corresponding second timing signals are drawn for the second clock, and then the number relation between the first timing periods and the second timing periods is determined according to the ratio of the number of the first timing periods contained in the first timing signals to the number of the second timing periods contained in the second timing signals.
In addition, in the scheme provided by the embodiment of the application, the second frequency is determined based on the first frequency and the number relation between the first timing period of the first clock and the second timing period of the second clock, so that the second frequency is easier to determine when the first frequency is N times of the second frequency, wherein N is a positive number greater than 1.
In this case, in the present application, the clock frequencies of the plurality of imaging devices may be acquired in advance, then the range in which the clock frequencies of the plurality of imaging devices are located may be determined, and then the first frequency may be set according to the range. For example, if the acquired clock frequency of the imaging device ranges from 80M to 90M, the first frequency may be set to 200M.
In step S13, an operation of determining the second frequency of the second clock is disclosed, which may be achieved by:
firstly, determining a corresponding relation between a first frequency and a second frequency based on a quantity relation between a first timing period and a second timing period;
then, a second frequency of the second clock is determined based on the correspondence between the first frequency and the second frequency and the first frequency.
If the number relationship between the first timing period and the second timing period is n/m, the corresponding relationship between the first frequency and the second frequency is: the ratio of the first frequency to the second frequency is m/n. In this case, if the first frequency is f1 and the second frequency is f2, f2=f1×n/m.
By the scheme provided by the embodiment of the application, the clock frequency of the imaging device can be determined, and in order to clarify the effect of the clock frequency, another embodiment is disclosed below. The embodiment further comprises the following steps:
before determining the second frequency of the second clock, transmitting first image data to an upper computer through a preset transmission frequency of the acquisition card;
after determining the second frequency of the second clock, the first image data is transmitted to the upper computer through the second frequency.
Based on the steps, after the second frequency is determined, the acquisition card can transmit the first image data to the upper computer through the second frequency, so that the imaging effect of the upper computer can be ensured.
In the solution provided in the embodiment of the present application, the acquisition card may periodically perform the operations of steps S11 to S13, that is, periodically determine the clock frequency of the first imaging device, during the process of acquiring the first image data from the first imaging device. In this case, if the second frequency of the second clock is periodically determined, the preset transmission frequency of the acquisition card is the frequency determined according to the previously received setting operation in the period of the first determination of the second frequency; and in other periods for determining the second frequency, the preset transmission frequency of the acquisition card is the second frequency of the second clock determined in the previous period.
That is, in the process of periodically determining the second frequency, in the first period, the preset transmission frequency of the acquisition card may be determined according to the preset receiving operation, and the first image data may be transmitted to the upper computer according to the preset transmission frequency. And, after the second frequency is determined by a certain period, the first image data is transmitted to the host computer by the determined second frequency, and before the end of the period of the next determined second frequency, the first image data is transmitted to the host computer by the determined second frequency of the period.
Through the operation of the embodiment of the application, the clock frequency of the first imaging device can be periodically determined, so that the frequency of the acquisition card for transmitting the first image data to the upper computer can be periodically adjusted, and the imaging effect of the image is further improved.
In addition, if the second frequency of the second clock is non-periodically determined, the preset transmission frequency of the acquisition card may be a frequency determined according to a previously received setting operation.
To clarify the application of the acquisition card to the second frequency, another embodiment is disclosed. Referring to fig. 5, the clock frequency determining method provided by the embodiment of the application includes the following steps:
Step S21, in the process that the acquisition card acquires the first image data from the first imaging device, the first image data is transmitted to the upper computer through the preset transmission frequency of the acquisition card.
That is, in the embodiment of the present application, before determining the clock frequency of the first imaging device, the acquisition card transmits the first image data to the upper computer through the preset transmission frequency.
If the second frequency is determined periodically, the preset transmission frequency of the acquisition card is the frequency determined according to the preset setting operation received in advance in the period of the first determined second frequency; and in other periods for determining the second frequency, the preset transmission frequency of the acquisition card is the second frequency of the second clock determined in the previous period.
Step S22, the first clock and the second clock are triggered to be timed at the same time.
The first clock is used for timing through a preset first frequency, the second clock is used for timing through a second frequency, and the second frequency is used for acquiring first image data from the first imaging device through the acquisition card.
Step S23, determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within the same timing period.
Step S24, determining a second frequency based on the number relationship between the first timing period and the second timing period and the first frequency, wherein the second frequency is a clock frequency of the first imaging device.
Step S25, after determining the second frequency of the second clock, transmitting the first image data to the upper computer through the second frequency.
According to the embodiment, the acquisition card can transmit the first image data to the upper computer through the second frequency after determining the second frequency, so that the imaging effect of the upper computer is guaranteed.
In the above embodiments, it is necessary to determine the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock within the same timing period. In one possible design, the timing duration may be preset, or in another possible design, the present application provides another embodiment. Referring to fig. 6, this embodiment includes the steps of:
step S31, before determining the quantitative relation between the first timing period of the first clock and the second timing period of the second clock, triggering the first clock and the second clock to perform timing simultaneously in the process of the acquisition card acquiring the second image data from the second imaging device.
The first clock is used for timing through a preset first frequency, and the second clock is used for timing through the frequency of the second image data acquired by the acquisition card.
In addition, in the embodiment of the present application, the clock frequency of the second imaging device is a known frequency.
And S32, after the first clock and the second clock are clocked for a plurality of times, determining the quantitative relation between a third timing period of the first clock and a fourth timing period of the second clock obtained by each time, wherein the timing duration of each time is different.
That is, in this embodiment, the first clock and the second clock are clocked a plurality of times, and the time duration of each time is different, and the quantitative relationship between the third time period and the fourth time period obtained after each time is determined from the plurality of times.
Step S33, determining a third frequency of acquiring second image data by the second clock obtained by each time based on the number relation between the third time period and the fourth time period obtained by each time and the first frequency.
For example, setting the first frequency to be f1, setting the third frequency to be f3, and after one time of timing, obtaining the number relationship between the third timing period and the fourth timing period to be s/t, the third frequency can be determined by the following formula: f3 =f1×s/t.
Step S34, calculating a difference between the third frequency obtained by each time counting and the clock frequency of the second imaging device.
In the embodiment of the present application, the clock frequency of the second imaging device is known, in which case the third frequency calculated in steps S31 to S34 may be compared with the clock frequency of the second imaging device, and if the two are closer, it indicates that the third frequency is closer to the clock frequency of the second imaging device, and the error is smaller if the third frequency calculated by the time duration is taken as the clock frequency of the second imaging device.
Step S35, determining a target duration based on the difference value. The target time length is the shortest time length in the timing time lengths corresponding to the difference values in the preset range.
That is, in this step, each of the time durations corresponding to each of the differences within the preset range may be determined, and then the shortest time duration thereof is taken as the target time duration.
Since the difference value corresponding to the target time length is within the preset range, the third frequency determined based on the target time length is closer to the clock frequency of the second imaging device, and thus the third frequency can be used as the clock frequency of the second imaging device. In addition, because the target time length is the shortest time length in the timing time length corresponding to the difference value in the preset range, when the third frequency is determined through the target time length, the third frequency can be determined quickly, and the efficiency of determining the third frequency is improved.
In this case, the determining the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock according to the embodiment of the present application may include the following steps:
and when the timing time length of the first clock and the second clock reaches the target time length, determining the quantity relation between the first timing period of the first clock and the second timing period of the second clock in the target time length.
In this embodiment, the timing is stopped each time the timing duration of the first clock and the second clock reaches the target duration, and the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock is determined within the target duration, so that the efficiency of determining the second frequency can be improved, and the efficiency of determining the clock frequency of the first imaging device can be further improved, while ensuring that the determined second frequency is closer to the clock frequency of the first imaging device.
Corresponding to the embodiment of the clock frequency determining method, the application also provides a clock frequency determining device. The following are embodiments of a clock frequency determination apparatus that may be used to perform method embodiments of the present application. For details not disclosed in this embodiment of the apparatus, please refer to an embodiment of the method of the present application.
The application provides a clock frequency determining device, which is applied to an acquisition card, wherein the acquisition card comprises a first clock and a second clock, and referring to fig. 7, the device comprises: a triggering module 110, a relationship determination module 120, and a frequency determination module 130.
The triggering module 110 is configured to trigger the first clock and the second clock to perform timing simultaneously in a process that the acquisition card acquires first image data from the first imaging device, where the first clock performs timing with a preset first frequency, and the second clock performs timing with a second frequency, and the second frequency is a frequency at which the acquisition card acquires the first image data from the first imaging device;
a relationship determining module 120, configured to determine a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within the same timing period;
a frequency determining module 130, configured to determine the second frequency based on the first frequency and the number relationship between the first timing period and the second timing period, where the second frequency is a clock frequency of the first imaging device.
The device provided by the embodiment of the application can determine the clock frequency of the imaging device, and the device is arranged in the acquisition card, namely the acquisition card can realize the determination of the clock frequency without connecting the imaging device with an upper computer, so that compared with the prior art, the device reduces the manual operation for connecting the imaging device with the upper computer, has a simpler implementation mode, correspondingly reduces the time for determining the clock frequency of the imaging device, and improves the efficiency for determining the clock frequency of the imaging device.
Furthermore, the device provided by the embodiment of the application can improve the efficiency of the acquisition card in determining the clock frequency of the imaging device, and can ensure the imaging effect of the upper computer when the acquisition card transmits the image data to the upper computer through the clock frequency of the imaging device, so that the device provided by the embodiment of the application is also beneficial to improving the imaging effect of the upper computer.
In one possible design, the relationship determination module 120 may determine the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock by:
drawing a first time sequence signal corresponding to the first clock and a second time sequence signal corresponding to the second clock in the process of timing of the first clock and the second clock;
determining a first number and a second number within the same timing duration, the first number being the number of the first timing periods included in the first timing signal and the second number being the number of the second timing periods included in the second timing signal;
calculating a ratio of the first number to the second number within the same timing duration, the ratio being used to characterize a number relationship between the first timing period and the second timing period.
In one possible design, the frequency determination module 130 may determine the second frequency of the second clock by:
determining a correspondence between the first frequency and the second frequency based on a quantitative relationship between the first timing period and the second timing period;
and determining a second frequency of the second clock based on the corresponding relation between the first frequency and the second frequency and the first frequency.
In one possible design, the clock frequency determining device is further configured to, before determining the second frequency of the second clock, transmit the first image data to an upper computer through a preset transmission frequency of the acquisition card; after determining a second frequency of the second clock, transmitting the first image data to the upper computer through the second frequency.
For example, if the second frequency of the second clock is determined periodically, in a period of determining the second frequency in the first period, the preset transmission frequency of the acquisition card is a frequency determined according to a preset setting operation;
and in other periods for determining the second frequency, the preset transmission frequency of the acquisition card is the second frequency of the second clock determined in the previous period.
In a possible design, the clock frequency determining means is further adapted to, before determining the quantitative relation between the first timing period of the first clock and the second timing period of the second clock, perform the following steps:
triggering the first clock and the second clock to time simultaneously in the process of acquiring second image data from a second imaging device by the acquisition card, wherein the first clock is used for timing through a first frequency, and the second clock is used for timing through the frequency of acquiring the second image data by the acquisition card;
after the first clock and the second clock are clocked for a plurality of times, determining the number relation between a third timing period of the first clock and a fourth timing period of the second clock, which are obtained by each time, wherein the timing duration of each time is different;
determining a third frequency of acquiring the second image data by the second clock obtained by each time based on the number relation between the third time period and the fourth time period obtained by each time and the first frequency;
calculating a difference between the third frequency obtained by each time of timing and the clock frequency of the second imaging device;
And determining a target time length based on the difference value, wherein the target time length is the shortest time length in the timing time lengths corresponding to the difference value in a preset range.
Accordingly, the frequency determining module 130 is specifically configured to determine, when the timing durations of the first clock and the second clock reach the target duration, a quantitative relationship between the first timing period of the first clock and the second timing period of the second clock within the target duration.
Correspondingly, the embodiment of the application discloses an acquisition card, referring to a structural schematic diagram shown in fig. 8, the acquisition card comprises:
the processor 1101 and the memory 1102 are provided,
further, the acquisition card further includes a first clock 1103 and a second clock 1104.
The first clock 1103 may be clocked at a preset first frequency, and the second clock may be clocked at a second frequency 1104. The second frequency may be a frequency at which the acquisition card acquires the first image data from the first imaging device during the process of the acquisition card acquiring the first image data from the first imaging device.
The memory 1102 is used for storing a computer program;
the processor 1101 is configured to invoke and execute the computer program stored in the memory, and when the computer program stored in the memory is executed by the processor 1101, cause the upper computer to perform all or part of the steps in the embodiments corresponding to fig. 3, 5 and 6.
The acquisition card of the embodiment of the present application may correspond to the acquisition card of the embodiment corresponding to fig. 3, 5 and 6, and the processor and the memory in the acquisition card may implement the functions and/or the implemented various steps and methods of the acquisition card of the embodiment corresponding to fig. 3, 5 and 6, which are not described herein for brevity.
Compared with the prior art, the acquisition card provided by the embodiment of the application has the advantages that the clock frequency of the imaging device can be determined, and the imaging device and the upper computer are not required to be connected, so that the manual operation for connecting the imaging device and the upper computer is reduced, the implementation mode is simpler, the time for determining the clock frequency of the imaging device is correspondingly reduced, and the efficiency for determining the clock frequency of the imaging device is improved.
Furthermore, the acquisition card provided by the embodiment of the application can improve the efficiency of determining the clock frequency of the imaging device, and can ensure the imaging effect of the upper computer when the acquisition card transmits the image data to the upper computer through the clock frequency of the imaging device, so that the acquisition card provided by the embodiment of the application is also beneficial to improving the imaging effect of the upper computer.
Accordingly, an embodiment of the present application provides a clock frequency determining system, including: a first imaging device and an acquisition card according to the above-described embodiments of the present application.
The first imaging device is used for shooting first image data. The first imaging device is connected with the acquisition card, and the acquisition card can acquire first image data from the first imaging device based on the connection. In addition, in the process of acquiring the first image data, the acquisition card may determine the clock frequency of the first imaging device based on the method provided in the foregoing embodiment of the present application, and transmit the first image data to the upper computer based on the clock frequency.
The system of the embodiment of the application can determine the clock frequency of the imaging device without connecting the imaging device with an upper computer, so compared with the prior art, the system can reduce the manual operation of connecting the imaging device with the upper computer, has a simpler implementation mode, correspondingly reduces the time for determining the clock frequency of the imaging device, and improves the efficiency for determining the clock frequency of the imaging device.
Furthermore, the system provided by the embodiment of the application can improve the efficiency of the acquisition card in determining the clock frequency of the imaging device, and the imaging effect of the upper computer can be ensured when the acquisition card transmits the image data to the upper computer through the clock frequency of the imaging device, so that the device provided by the embodiment of the application is also beneficial to improving the imaging effect of the upper computer.
The various illustrative logical blocks and circuits described in connection with the embodiments of the present application may be implemented or performed with a general purpose processor, a digital information processor, an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the general purpose processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital information processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital information processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software unit executed by a processor, or in a combination of the two. The software elements may be stored in random access memory (random access memory, RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disk, a removable disk, a portable compact disc read-only memory (compact disc read-only memory), or any other form of storage medium known in the art. In an example, a storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may reside in a User Equipment (UE). In the alternative, the processor and the storage medium may reside in different components in a UE.
It should be understood that, in various embodiments of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
The same and similar parts of the embodiments of this specification are all mutually referred to, and each embodiment is mainly described in the differences from the other embodiments. In particular, for apparatus and system embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of the method embodiments section.
It will be apparent to those skilled in the art that the techniques of embodiments of the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present application may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the embodiments of the road constraint determining apparatus disclosed in the present application, since it is substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description in the method embodiments for the matters.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (10)

1. A method of clock frequency determination, applied to an acquisition card, the acquisition card comprising a first clock and a second clock, the method comprising:
triggering the first clock and the second clock to time simultaneously in the process of acquiring first image data from a first imaging device by the acquisition card, wherein the first clock is used for timing through a preset first frequency, and the second clock is used for timing through a second frequency, and the second frequency is the frequency of acquiring the first image data from the first imaging device by the acquisition card;
determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within the same timing period;
the second frequency is determined based on the first frequency and a quantitative relationship between the first timing period and the second timing period, the second frequency being a clock frequency of the first imaging device.
2. The method of claim 1, wherein the determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock within a same timing period comprises:
Drawing a first time sequence signal corresponding to the first clock and a second time sequence signal corresponding to the second clock in the process of timing of the first clock and the second clock;
determining a first number and a second number within the same timing duration, the first number being the number of the first timing periods included in the first timing signal and the second number being the number of the second timing periods included in the second timing signal;
calculating a ratio of the first number to the second number within the same timing duration, the ratio being used to characterize a number relationship between the first timing period and the second timing period.
3. The method of claim 1 or 2, wherein the determining the second frequency of the second clock comprises:
determining a correspondence between the first frequency and the second frequency based on a quantitative relationship between the first timing period and the second timing period;
and determining a second frequency of the second clock based on the correspondence and the first frequency.
4. The method as recited in claim 1, further comprising:
Before determining the second frequency of the second clock, transmitting the first image data to an upper computer through a preset transmission frequency of the acquisition card;
after determining a second frequency of the second clock, transmitting the first image data to the upper computer through the second frequency.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
if the second frequency of the second clock is determined periodically, in the period of determining the second frequency in the first time, the preset transmission frequency of the acquisition card is the frequency determined according to the preset setting operation;
and in other periods for determining the second frequency, the preset transmission frequency of the acquisition card is the second frequency of the second clock determined in the previous period.
6. The method of claim 1, further comprising, prior to determining the quantitative relationship between the first timing period of the first clock and the second timing period of the second clock:
triggering the first clock and the second clock to time simultaneously in the process of acquiring second image data from a second imaging device by the acquisition card, wherein the first clock is used for timing through the first frequency, and the second clock is used for timing through the frequency of acquiring the second image data by the acquisition card;
After the first clock and the second clock are clocked for a plurality of times, determining the number relation between a third timing period of the first clock and a fourth timing period of the second clock, which are obtained by each time, wherein the timing duration of each time is different;
determining a third frequency of acquiring the second image data by the second clock obtained by each time based on the number relation between the third time period and the fourth time period obtained by each time and the first frequency;
calculating a difference between the third frequency obtained by each time of timing and the clock frequency of the second imaging device;
and determining a target time length based on the difference value, wherein the target time length is the shortest time length in the timing time lengths corresponding to the difference value in a preset range.
7. The method of claim 6, wherein the determining a quantitative relationship between a first timing period of the first clock and a second timing period of the second clock comprises:
and when the timing duration of the first clock and the second clock reaches the target duration, determining the quantity relation between the first timing period of the first clock and the second timing period of the second clock in the target duration.
8. A clock frequency determining apparatus for use with an acquisition card, the acquisition card including a first clock and a second clock, the apparatus comprising:
the triggering module is used for triggering the first clock and the second clock to time simultaneously in the process of acquiring first image data from the first imaging device by the acquisition card, wherein the first clock is used for timing through a preset first frequency, and the second clock is used for timing through a second frequency, and the second frequency is the frequency of acquiring the first image data from the first imaging device by the acquisition card;
the relation determining module is used for determining the quantity relation between the first timing period of the first clock and the second timing period of the second clock in the same timing duration;
and the frequency determining module is used for determining the second frequency based on the number relation between the first timing period and the second timing period and the first frequency, wherein the second frequency is the clock frequency of the first imaging device.
9. An acquisition card, characterized in that the acquisition card comprises:
a first clock and a second clock;
a memory storing a computer program and a processor implementing the method of any one of claims 1 to 7 when the computer program is executed by the processor.
10. A clock frequency determination system, comprising:
a first imaging device for capturing first image data;
the acquisition card of claim 9.
CN202310709965.7A 2023-06-15 2023-06-15 Clock frequency determining method, device, acquisition card and system Pending CN116743890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310709965.7A CN116743890A (en) 2023-06-15 2023-06-15 Clock frequency determining method, device, acquisition card and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310709965.7A CN116743890A (en) 2023-06-15 2023-06-15 Clock frequency determining method, device, acquisition card and system

Publications (1)

Publication Number Publication Date
CN116743890A true CN116743890A (en) 2023-09-12

Family

ID=87902430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310709965.7A Pending CN116743890A (en) 2023-06-15 2023-06-15 Clock frequency determining method, device, acquisition card and system

Country Status (1)

Country Link
CN (1) CN116743890A (en)

Similar Documents

Publication Publication Date Title
CN107148009B (en) Multi-standard mobile communication network internet data flow measuring device and method thereof
CN108647176B (en) Data transmission method for Internet of vehicles equipment and Internet of vehicles equipment
CN105373479A (en) Automatic test method and device of memory leakage and mobile terminal
CN108322737B (en) Method and device for measuring camera shooting frame rate
US8589717B1 (en) Serial peripheral interface
CN105512033A (en) Automated testing method and device of mobile terminal and mobile terminal
CN111327758A (en) Camera sharing method and device
CN109462448A (en) A kind of radio frequency test method, mobile terminal and storage medium
CN109874010A (en) A kind of automatic testing method and system of camera module
CN111817924A (en) Test method and related equipment
CN111159042A (en) Fluency testing method and device and electronic equipment
CN114328312B (en) Data processing method, computer device and readable storage medium
US10271044B2 (en) Method and system for checking video call quality of mobile terminal
CN116743890A (en) Clock frequency determining method, device, acquisition card and system
CN107306397B (en) Terminal equipment network access method and device based on wireless communication technology
CN108173950B (en) Data transmission method, device and system, image acquisition equipment and storage medium
CN116247755B (en) Protocol information testing method, tester and storage medium
CN104021095A (en) Data processing apparatus and control method
CN111556535B (en) Communication method, communication device, electronic equipment and storage medium
CN112102796B (en) Method and device for acquiring ambient light information by using camera and terminal equipment
CN110572479B (en) Electronic scale management method, electronic scale and storage medium
CN104335552A (en) Data interface sleep mode logic
CN109614359B (en) AXI bus-based data transmission method, device and storage medium
FR2994485A1 (en) METHOD FOR TESTING EQUIPMENT, TESTING TOOL AND TESTING SYSTEM THEREFOR
CN113873233A (en) Lens module detection method and device and electronic equipment

Legal Events

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