CN116880907B - Real-time wavelength peak value extraction method, device, equipment and storage medium - Google Patents

Real-time wavelength peak value extraction method, device, equipment and storage medium Download PDF

Info

Publication number
CN116880907B
CN116880907B CN202311105313.9A CN202311105313A CN116880907B CN 116880907 B CN116880907 B CN 116880907B CN 202311105313 A CN202311105313 A CN 202311105313A CN 116880907 B CN116880907 B CN 116880907B
Authority
CN
China
Prior art keywords
image data
memory
continuous
requirement
data
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.)
Active
Application number
CN202311105313.9A
Other languages
Chinese (zh)
Other versions
CN116880907A (en
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.)
Wuhan Jingyi Microinstrument Co ltd
Wuhan Jingce Electronic Group Co Ltd
Original Assignee
Wuhan Jingyi Microinstrument Co ltd
Wuhan Jingce Electronic Group 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 Wuhan Jingyi Microinstrument Co ltd, Wuhan Jingce Electronic Group Co Ltd filed Critical Wuhan Jingyi Microinstrument Co ltd
Priority to CN202311105313.9A priority Critical patent/CN116880907B/en
Publication of CN116880907A publication Critical patent/CN116880907A/en
Application granted granted Critical
Publication of CN116880907B publication Critical patent/CN116880907B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3867Concurrent instruction execution, e.g. pipeline, look ahead using instruction pipelines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
    • G06F5/065Partitioned buffers, e.g. allowing multiple independent queues, bidirectional FIFO's

Abstract

The invention relates to a method, a device, equipment and a storage medium for extracting a real-time wavelength peak value, which comprise the following steps: caching the image data into each path of memory according to the image columns respectively; meanwhile, screening the image data of the continuous segments in each path of memory, and judging whether the image data of the continuous segments in each path of memory meets the requirement of calculating peak values or not; if yes, calculating a spectrum wavelength peak value in real time according to the image data of the continuous section in the memory; otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty. Because the image data are respectively cached in each path of memory according to the image columns, the image data of continuous sections in each path of memory can be simultaneously screened, and the spectrum wavelength peak value of each path is calculated in real time, the wavelength peak value can be extracted in real time in a parallel pipeline processing mode, the processing speed of peak value extraction is greatly improved, and the complexity is low.

Description

Real-time wavelength peak value extraction method, device, equipment and storage medium
Technical Field
The invention relates to the field of online spectral confocal sensor design, in particular to a method, a device, equipment and a storage medium for extracting a real-time wavelength peak value.
Background
At present, in the design of an online spectral confocal sensor, the real-time property of sampling data and the accuracy of wavelength peak value extraction directly influence the design index of a system, so that the real-time extraction of the wavelength peak value of the spectrum is particularly important.
In the related art, in the related design disclosed at present, the extraction of the wavelength peak value is mostly realized by adopting software methods such as polynomial fitting, machine learning and the like, but the methods such as polynomial fitting, machine learning and the like have high complexity and long processing time consumption, and often become the bottleneck of the design.
Therefore, there is a need to design a new method, apparatus, device and storage medium for extracting wavelength peaks in real time to overcome the above-mentioned problems.
Disclosure of Invention
The embodiment of the invention provides a real-time wavelength peak value extraction method, which aims to solve the problems of high complexity and long processing time consumption of methods such as polynomial fitting, machine learning and the like in the related technology.
In a first aspect, a method for extracting a real-time wavelength peak is provided, which includes the following steps: caching the image data into each path of memory according to the image columns respectively; simultaneously screening the image data of continuous segments in each path of memory; judging whether the image data of the continuous segments in each path of memory meet the requirement of calculating peak values or not; if yes, calculating a spectrum wavelength peak value according to the image data of the continuous section in the memory; otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty.
In some embodiments, the determining whether the image data of the continuous segments in each memory meets the peak calculation requirement includes: judging whether the maximum value and the minimum value of the image data of the continuous section meet the set value requirement or not, and whether the length of the continuous section meets the set length requirement or not; if yes, the image data of the current continuous section meets the peak value calculation requirement; otherwise, the calculation peak value requirement is not satisfied.
In some embodiments, the filtering the image data of the continuous segments in each path of memory includes: reading image data in a memory, and judging whether the image data meets the requirement of a continuous segment threshold; if yes, the image data of the continuous segments are stored, and statistics of the maximum value, the minimum value, the line number and the column number of the image data are carried out at the same time.
In some embodiments, the calculating the spectral wavelength peak in real time from the image data of the successive segments in the memory includes: and calculating the spectrum wavelength peak value according to the image data of the continuous segments and the line number corresponding to the image data.
In some embodiments, the calculating the spectral wavelength peak according to the image data of the continuous segment and the number of lines corresponding to the image data includes: reading all stored image data of continuous segments in each path, weighting the image data according to the line numbers corresponding to the image data, and obtaining the weighted accumulated sum; calculating the accumulated sum of all stored image data of all continuous segments; the spectral wavelength peak is calculated from the weighted sum and the sum of the image data of all successive segments.
In some embodiments, the method includes the steps of simultaneously screening image data of continuous segments in each path of memory, judging whether the image data of the continuous segments in each path of memory meets the requirement of calculating peak values, and if yes, calculating spectrum wavelength peak values in real time according to the image data of the continuous segments in the memory; otherwise, continuing to screen the image data of the continuous segment in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty, including: simultaneously reading the image data in each path of memory, and judging whether the image data meets the requirement of a continuous segment threshold; if yes, the image data of the continuous segment is subjected to data storage, then the image data in the memory is continuously read, and whether the continuous segment threshold requirement is met or not is judged, until the data in the memory is empty; if the image data does not meet the continuous segment threshold requirement, judging whether the image data of the continuous segment in the memory meets the calculation peak requirement or not; if the calculation peak value requirement is met, calculating a spectrum wavelength peak value according to the image data of the continuous section in the memory; if the calculation peak value requirement is not met, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty.
In a second aspect, a real-time wavelength peak extraction apparatus is provided, which includes parallel multi-path peak extraction channels, wherein each path of peak extraction channel includes: a memory for caching image data in image columns; the data processing units are connected with the memories in a signal mode and are used for screening the image data of the continuous sections in the memories at the same time and judging whether the image data of the continuous sections in the memories meet the peak value calculation requirement or not; if yes, calculating a spectrum wavelength peak value in real time according to the image data of the continuous section in the memory; otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty.
In a third aspect, a storage device is provided, the storage device comprising a memory and a processor, the memory for storing computer instructions; the processor executes the computer instructions stored by the memory to cause the memory device to perform the real-time wavelength peak extraction method described above.
In a fourth aspect, a computer readable storage medium is provided, wherein the computer readable storage medium stores computer program code, which when executed by a computer device, implements the above-mentioned real-time wavelength peak extraction method.
The technical scheme provided by the invention has the beneficial effects that:
the embodiment of the invention provides a method, a device, equipment and a storage medium for extracting a wavelength peak value in real time, which can screen image data of continuous segments in each path of memory and calculate the spectrum wavelength peak value of each path in real time because the image data are respectively cached in each path of memory according to image columns, thus the wavelength peak value can be extracted in real time in a parallel pipeline processing mode, the processing speed of peak value extraction is greatly improved, and the complexity is low.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for extracting a real-time wavelength peak value according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a real-time wavelength peak value extraction device according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of step S1 provided in the embodiment of the present invention;
fig. 4 is a schematic flow chart of step S2 provided in the embodiment of the present invention;
FIG. 5 is a schematic flow chart of calculating a spectrum wavelength peak value by using a centroid method according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of the data aggregation unit according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a parallel pipeline architecture according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides a method, a device, equipment and a storage medium for extracting a real-time wavelength peak value, which can solve the problems of high complexity and long processing time consumption of methods such as polynomial fitting, machine learning and the like in the related technology.
Referring to fig. 1, a method for extracting a real-time wavelength peak according to an embodiment of the present invention may include the following steps:
s1: the image data are respectively cached in each path of memory according to the image columns. Before step S1, the acquisition of CMOS image data may be completed through the data input unit, or the image data may be read from the internal buffer memory, and after the image data is read, the image data may be buffered into each FIFO (i.e., the memory, may be denoted as the first FIFO) according to the size of the image pixel and the width of the bus, respectively, where the size of the pixel and the width of the bus need to be selected in consideration of the internal resources of the FPGA (Field Programmable Gate Array ) to prevent the data from being unable to be synthesized. Each way of memory may store a column of data in the entire image, such as branch 1 storing a first column of data, branch 2 storing a second column of data …, and branch N storing an nth column of data. The data input unit automatically stops after the whole image is read.
S2: meanwhile, screening the image data of the continuous segments in each path of memory, and judging whether the image data of the continuous segments in each path of memory meets the requirement of calculating peak values or not; if yes, calculating a spectrum wavelength peak value in real time according to the image data of the continuous section in the memory; otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty. It should be understood that the simultaneous screening, i.e. the multiple branches are parallel, and the multiple branches may simultaneously analyze the image data in the respective branches to calculate the spectral wavelength peak on each branch, and the branches do not affect each other.
Further, while the image data is buffered in each path of the first FIFO, the empty-full condition of each path of the first FIFO may be detected to prevent the data from overflowing.
Referring to fig. 4, when the image data of the continuous segment in each path of memory is simultaneously screened, the image data of the continuous segment in the first FIFO may be screened by the buffer control unit in each path; judging whether the image data of the continuous segments in each path of memory meet the requirement of calculating peak values or not; if the calculation peak value requirement is met, calculating the spectrum wavelength peak value according to the image data of the continuous section in the memory, and continuously reading the data in the first FIFO after the calculation is completed until the first FIFO is empty.
In this embodiment, since the image data are respectively cached in each path of memory according to the image columns, the image data of continuous segments in each path of memory can be simultaneously screened, the spectrum wavelength peak value of each path can be calculated in real time, and each path can be calculated in parallel, so that the wavelength peak value can be extracted in real time in a parallel pipeline processing mode, the processing speed of peak value extraction is greatly improved, and the complexity is low; thereby enabling the design of high frame rate linear confocal sensors. Before calculating the spectrum wavelength peak value, judging the image data of the continuous section, judging whether the image data of the continuous section meets the requirement of calculating the peak value, and carrying out the subsequent calculation step if the image data of the continuous section meets the requirement, and not carrying out calculation if the image data of the continuous section does not meet the requirement, so that the problem that the spectrum wavelength peak value cannot be calculated or the spectrum wavelength peak value which is not ideal can be avoided under the condition that the image data of the continuous section does not meet the requirement is avoided.
Further, when screening the image data of the continuous segment, a relevant threshold parameter may be introduced to perform further screening, where the specific threshold parameter is related to a wavelength peak extraction algorithm to be implemented, and the wavelength peak extraction algorithm may use, for example, a centroid method, a newton method, and the like. In this embodiment, taking the centroid method as an example, the determining whether the image data of the continuous segment in each path of memory meets the requirement of calculating the peak value may include: judging whether the maximum value and the minimum value of the image data of the continuous segment meet the set value requirement (namely, meet the set maximum value requirement and the set minimum value requirement) and whether the length of the continuous segment meets the set length requirement; if the maximum value and the minimum value of the image data of the continuous segment meet the set value requirement and the length of the continuous segment also meets the set length requirement, the image data of the current continuous segment meets the calculation peak value requirement, the extraction of the spectrum wavelength peak value can be started, and the first FIFO data is continuously read after the calculation is completed; if at least one of the maximum value, the minimum value and the length of the continuous segment does not meet the set value requirement, the calculation peak value requirement is not met, the spectrum wavelength peak value is not calculated, and the first FIFO data is continuously read until the first FIFO is empty.
Referring to fig. 4, in some embodiments, the filtering the image data of the continuous segments in each memory includes: for each path, reading the image data in the memory, and judging whether the image data meets the requirement of a continuous segment threshold; if yes, the image data of the continuous segments are stored, and statistics of the maximum value, the minimum value, the line number and the column number of the image data are carried out at the same time. In this embodiment, for the centroid method, in the process of reading the first FIFO, statistics of information such as the maximum value, the minimum value, the number of rows and the number of columns of the image data may be performed simultaneously, and of course, if another method is adopted to calculate the spectrum wavelength peak value, other information of the image data may also be counted according to the calculation requirement, so that the spectrum wavelength peak value is calculated later, and the statistical information is not limited.
Referring to fig. 5, in some alternative embodiments, the calculating the spectral wavelength peak in real time according to the image data of the continuous segments in the memory may include: and calculating the spectrum wavelength peak value according to the image data of the continuous segments and the line number corresponding to the image data.
Taking the centroid method as an example, the calculating the spectrum wavelength peak value according to the image data of the continuous segment and the line number corresponding to the image data includes: reading all stored image data of continuous segments in each path, weighting the image data according to the line numbers corresponding to the image data, and obtaining the weighted accumulated sum; calculating the accumulated sum of all stored image data of all continuous segments; the spectral wavelength peak is calculated from the weighted sum and the sum of the image data of all successive segments. Specifically, for the branch 1, the image data of all the continuous segments stored in the branch may be sequentially read, weighted with the counted number of lines of the branch, and the weighted sum is obtained, and the sum of the image data of all the continuous segments of the branch is calculated, where the sum of the image data of all the continuous segments of the branch and the weighted sum are divided, so as to obtain the center of the wavelength peak, that is, the final calculation result (spectrum wavelength peak).
Referring to fig. 4, in some alternative embodiments, in step S2, the image data of the continuous segments in each memory are screened at the same time, and whether the image data of the continuous segments in each memory meets the peak calculation requirement is determined, if yes, the spectrum wavelength peak is calculated in real time according to the image data of the continuous segments in the memory; otherwise, continuing to filter the image data of the continuous segment in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty, which may include: simultaneously reading the image data in each path of memory, and judging whether the image data meets the requirement of a continuous segment threshold, wherein before the image data in the first FIFO is read, whether the data in the first FIFO is empty or not can be judged, if not, the reading is stopped, and if not, the reading is stopped; if the image data meets the continuous segment threshold requirement, the image data of the continuous segment is subjected to data storage and can be stored in the RAM, then the image data in the memory is continuously read and whether the continuous segment threshold requirement is met is judged, until the data in the memory is empty; if the image data does not meet the continuous segment threshold requirement, judging whether the image data of the continuous segment in the memory meets the calculation peak requirement, and judging whether the data cached in the RAM meets the calculation peak requirement at the moment; if the calculation peak value requirement is met, calculating a spectrum wavelength peak value according to the image data of the continuous section in the memory (namely, the image data cached in the RAM); if the calculation peak value requirement is not met, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty.
Referring to fig. 7, in the embodiment of the present invention, due to the parallel computing frame and the pipeline technology of the FPGA, the efficiency of wavelength peak extraction is greatly improved, so that the design of the high frame rate linear confocal sensor is possible. Meanwhile, under the condition that the selected FPGA resources are richer, more paths of parallel peak extraction channels can be designed by adopting the method, and the method can be theoretically suitable for any high-frame-rate linear confocal sensor.
Referring to fig. 2, the embodiment of the present invention further provides a real-time wavelength peak extraction device, which may include parallel multiple peak extraction channels, where each peak extraction channel includes: a memory (which may be a first FIFO) for buffering image data by image column; the data processing units are connected with the memories in a signal mode and are used for screening the image data of the continuous sections in the memories at the same time and judging whether the image data of the continuous sections in the memories meet the peak value calculation requirement or not; if yes, calculating a spectrum wavelength peak value in real time according to the image data of the continuous section in the memory; otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the calculation peak value requirement is met or not until the data in the memory is empty.
The real-time wavelength peak value extraction device may further include a data input unit, where the data input unit mainly completes acquisition of CMOS image data, or reads image data from an internal buffer, after the image data is read, the image data is buffered into each path of the first FIFO according to the size of a pixel and the width of a bus, and meanwhile, the empty and full condition of the first FIFO is detected, so as to prevent data overflow, as shown in fig. 3. The size of the pixels and the width of the bus are selected by considering the internal resources of the FPGA, so that the FPGA cannot be synthesized, and the multi-path peak extraction channel, the data input unit and other unit modules are arranged on the FPGA. The data input unit automatically stops after the whole image is read.
The data processing unit may include a cache control unit, a statistics unit, a RAM (Random Access Memory ) and a calculation unit.
The memory is a first FIFO, is used as a first level data buffer, mainly completes the buffer of image column data, and a writing end is connected with a data input unit to provide a writing interface and related overflow mark signals; the reading end is connected with the cache control unit and provides a reading interface and related overflow mark signals. The depth selection of the first FIFO needs to be matched to the image column depth of the CMOS.
Referring to fig. 4, the buffer control unit is mainly configured to screen image data of a continuous segment in the first FIFO, and may introduce a relevant threshold parameter to perform further screening, where the specific parameter is related to a wavelength peak extraction algorithm to be implemented. The screening process may be: and detecting that the data in the first FIFO is not empty, reading the data, judging whether the data meets the threshold requirement, writing the data into a next-stage RAM module if the data meets the threshold requirement, and discarding if the data does not meet the threshold requirement. The data segment between two pixels that do not meet the threshold requirement is then considered a continuous segment. In the process of reading the first FIFO, information statistics such as the maximum value, the minimum value, the number of rows, the number of columns, etc. of the image data are performed at the same time, and the statistics unit is written in, and at the end of the continuous segment, whether to perform calculation of the spectral wavelength peak can be determined by judging the relevant statistics information. If not, the first FIFO data continues to be read until the first FIFO is empty. If the calculation is performed, the system enters a waiting state, the calculation unit starts to extract the spectrum wavelength peak value, and after the calculation is completed, the first FIFO data is continuously read until the first FIFO is empty.
The input end of the statistics unit is connected with the cache control unit, and the output end of the statistics unit is connected with the calculation unit. The cache control unit synchronously writes the relevant information of the statistics in the process of reading the data. The calculation unit reads the relevant values of the statistical unit to participate in the operation in the starting calculation process.
The RAM mainly completes the buffer function of the image data of the continuous section to be calculated. The upper level is connected with the cache control unit, and the lower level is connected with the calculation unit. The depth of the RAM is determined by the largest continuous segment, and the RAM can be configured according to the number of image columns under the condition of rich FPGA resources.
In some embodiments, each peak extraction channel may also include another FIFO (First In First Out, a first-in-first-out memory structure), which may be referred to as a second FIFO, for storing data.
The calculation unit mainly performs a specific algorithm of spectral wavelength peak extraction, for example: centroid method, newton method, etc. The upper stage is connected to a RAM unit storing successive pieces of CMOS image data, and to a statistical unit storing relevant statistical information. The calculation unit calculates the output peak value extraction result, and writes the peak value extraction result into the second FIFO in combination with the column number of the current statistical unit, and informs the cache control unit of calculating the completion signal, and the cache control unit can exit for waiting and continue execution.
Referring to fig. 6, the real-time wavelength peak value extraction device may further include a data collection unit, where the data collection unit mainly completes the data collection function of each parallel calculation unit. The upper stage is connected with the output second FIFO of each computing unit, and the next stage directly outputs the computing result to a specific interface by judging whether the second FIFO is empty or not and continuously reading the second FIFO data, and provides relevant interrupt signals to indicate the completion of the whole processing flow.
Here, the example of 2048×1088×8bits of image data is read from the memory with a bus bit width of 128bits, and the example of realizing the spectral wavelength peak extraction according to the centroid method is described.
Referring to fig. 3, the data input unit sequentially reads 2048×1088×8bits of image data from the memory in columns, and each data read is stored in 128/8=16 first FIFOs. When the first FIFO is full, the reading of the data is suspended, and when the first FIFO is not full, the reading is continued until the whole image data is traversed. The first FIFO depth is set to 1088.
Referring to fig. 4, the buffer control unit starts to read data in the first FIFO by detecting that the first FIFO is not empty, compares the data with an image gray threshold of the centroid method, determines whether the image data is valid data, stores the data if the image data is valid, and starts the statistics unit to perform statistics on the maximum value, the minimum value, the image line number and the image line number of the image data. When the data is invalid, judging whether the cached image data in the RAM meets the length set value, the maximum value and the minimum value of the continuous segment. If so, the image data of the current continuous segment meets the calculation requirement, and the calculation unit is started for calculation. If not, continuing to read the first FIFO to perform data traversal until the first FIFO is empty.
Referring to fig. 5, the calculation unit performs spectral wavelength peak extraction after the buffer control unit indicates that the data is valid. The method comprises the steps of sequentially reading image data cached in the RAM, weighting the image data with the line number in the statistical unit, obtaining a weighted accumulated sum, and dividing the weighted accumulated sum and the accumulated sum of the image data cached in the RAM, so as to obtain a wavelength peak centroid, namely a final calculation result. And outputting the calculation result and the column number counted by the counting unit to the next stage of FIFO (namely the second FIFO) together, exiting the calculation flow, and enabling the cache control unit to continue to operate.
Referring to fig. 6, the data collecting unit traverses 16 paths of second FIFOs sequentially, when the second FIFO is not empty, the second FIFO data is read, and is output to the memory according to the memory access interface, when the data input unit finishes data reading, the computing unit finishes data computing, and the FIFO reads empty, the data collecting unit sends a wavelength peak value extraction completion signal, and the whole processing flow is completed.
In the whole processing flow, the data input unit, the data processing unit and the data collecting unit form a data processing pipeline, so that the data processing efficiency is improved. Meanwhile, the data processing unit performs 16-channel multiplexing, so that the data processing efficiency is improved, the overall operation efficiency is further improved, and the real-time wavelength peak extraction performance at 300fps can be realized.
The embodiment of the invention also provides a storage device, which comprises a memory and a processor, wherein the memory is used for storing computer instructions; the processor executes the computer instructions stored by the memory to cause the memory device to perform the real-time wavelength peak extraction method described above.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores computer program codes, and when the computer program codes are executed by computer equipment, the computer equipment realizes the real-time wavelength peak value extraction method.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM, random access memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that in the present invention, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. The method for extracting the wavelength peak value in real time is characterized by comprising the following steps of:
caching the image data into each path of memory according to the image columns respectively;
meanwhile, the image data of the continuous segments in each path of memory are screened, whether the maximum value and the minimum value of the image data of the continuous segments in each path of memory meet the set value requirement or not is judged, and whether the length of the continuous segments meets the set length requirement or not is judged;
if yes, reading all stored image data of all continuous segments and weighting the image data corresponding to the number of lines to obtain a weighted accumulation sum; calculating the accumulated sum of all stored image data of all continuous segments; calculating a spectrum wavelength peak value according to the weighted accumulated sum and the accumulated sum of the image data of all the continuous segments;
otherwise, continuing to screen the image data of the continuous section in the memory and judging whether the maximum value, the minimum value and the length meet the requirements or not until the data in the memory is empty;
the filtering of the image data of the continuous segments in each memory includes determining whether the image data in the memory meets the continuous segment threshold requirement, and the data segment between two pixels that do not meet the continuous segment threshold requirement is regarded as a continuous segment.
2. The method for extracting a peak value of a wavelength in real time according to claim 1, wherein said filtering the image data of the continuous segments in each memory includes:
reading image data in a memory, and judging whether the image data meets the requirement of a continuous segment threshold;
if yes, the image data of the continuous segments are stored, and statistics of the maximum value, the minimum value, the line number and the column number of the image data are carried out at the same time.
3. The method for extracting a peak value of a real-time wavelength according to claim 1, wherein the step of simultaneously filtering the image data of the continuous segments in each memory and judging whether the maximum value and the minimum value of the image data of the continuous segments in each memory meet the set requirement and whether the length of the continuous segments meet the set length requirement comprises:
simultaneously reading the image data in each path of memory, and judging whether the image data meets the requirement of a continuous segment threshold;
if yes, the image data of the continuous segment is subjected to data storage, then the image data in the memory is continuously read, and whether the continuous segment threshold requirement is met or not is judged, until the data in the memory is empty;
if the image data does not meet the continuous segment threshold requirement, judging whether the maximum value and the minimum value of the image data of the continuous segments in each path of memory meet the set value requirement or not and whether the length of the continuous segments meets the set length requirement or not;
if yes, calculating a spectrum wavelength peak value according to the image data of the continuous section in the memory;
otherwise, continuing to screen the image data of the continuous segments in the memory and judging whether the maximum value, the minimum value and the length meet the requirements or not until the data in the memory is empty.
4. A real-time wavelength peak extraction device, comprising a plurality of parallel peak extraction channels, wherein each peak extraction channel comprises:
a memory for caching image data in image columns;
the data processing units are connected with the memories in a signal mode, and are used for screening the image data of the continuous sections in the memories at the same time and judging whether the maximum value and the minimum value of the image data of the continuous sections in the memories meet the set value requirement or not and whether the length of the continuous sections meets the set length requirement or not; if yes, reading all stored image data of all continuous segments and weighting the image data corresponding to the number of lines to obtain a weighted accumulation sum; calculating the accumulated sum of all stored image data of all continuous segments; calculating a spectrum wavelength peak value according to the weighted accumulated sum and the accumulated sum of the image data of all the continuous segments; otherwise, continuing to screen the image data of the continuous section in the memory and judging whether the maximum value, the minimum value and the length meet the requirements or not until the data in the memory is empty;
the filtering of the image data of the continuous segments in each memory includes determining whether the image data in the memory meets the continuous segment threshold requirement, and the data segment between two pixels that do not meet the continuous segment threshold requirement is regarded as a continuous segment.
5. A memory device comprising a memory and a processor, the memory for storing computer instructions; the processor executes the computer instructions stored by the memory to cause the storage device to perform the real-time wavelength peak extraction method of any one of the preceding claims 1 to 3.
6. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program code which, when executed by a computer device, implements the real-time wavelength peak extraction method of any one of the preceding claims 1 to 3.
CN202311105313.9A 2023-08-30 2023-08-30 Real-time wavelength peak value extraction method, device, equipment and storage medium Active CN116880907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311105313.9A CN116880907B (en) 2023-08-30 2023-08-30 Real-time wavelength peak value extraction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311105313.9A CN116880907B (en) 2023-08-30 2023-08-30 Real-time wavelength peak value extraction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116880907A CN116880907A (en) 2023-10-13
CN116880907B true CN116880907B (en) 2024-01-30

Family

ID=88257120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311105313.9A Active CN116880907B (en) 2023-08-30 2023-08-30 Real-time wavelength peak value extraction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880907B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005115631A (en) * 2003-10-07 2005-04-28 Olympus Corp Image display device and method
CN107131855A (en) * 2017-04-14 2017-09-05 中国科学院光电研究院 A kind of Spectral Confocal measuring system caliberating device and scaling method
CN110095066A (en) * 2019-03-04 2019-08-06 华中科技大学 Spectral Confocal signal peak wavelength quick and high-precision method for extracting based on Mean-shift
CN112462349A (en) * 2020-11-20 2021-03-09 武汉烽火凯卓科技有限公司 Wavelength calculation method, system, server and storage medium for spectrum confocal displacement sensor
CN113074814A (en) * 2021-03-11 2021-07-06 华中科技大学 Method and device for evaluating quality of spectral signal of dispersion confocal sensor
CN113108910A (en) * 2021-04-22 2021-07-13 熵智科技(深圳)有限公司 Light source spectral image acquisition method, device, equipment and storage medium
CN114358053A (en) * 2021-12-16 2022-04-15 熵智科技(深圳)有限公司 Spectrum confocal multi-peak extraction method, module, computer equipment and storage medium
CN114370820A (en) * 2022-03-22 2022-04-19 武汉精立电子技术有限公司 Peak extraction method, detection method and system of spectrum confocal displacement sensor
CN114972003A (en) * 2022-05-27 2022-08-30 中国铁建重工集团股份有限公司 FPGA-based light stripe center extraction method, device, equipment and medium
CN115235626A (en) * 2021-04-22 2022-10-25 熵智科技(深圳)有限公司 Method and device for acquiring light source spectrum image, computer equipment and medium
WO2023000907A1 (en) * 2021-07-23 2023-01-26 奥比中光科技集团股份有限公司 Method and apparatus for determining spectral image, terminal, and storage medium
CN115700042A (en) * 2020-05-29 2023-02-03 株式会社半导体能源研究所 Optical functional device, functional panel, display device, input/output device, and data processing device
CN116067625A (en) * 2023-01-29 2023-05-05 中电科思仪科技股份有限公司 System and method for testing long-time wavelength stability of built-in light source of spectrometer
CN116089824A (en) * 2023-03-30 2023-05-09 奥谱天成(厦门)光电有限公司 Peak extraction method, system and medium of spectrum confocal displacement sensor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11010877B2 (en) * 2017-01-27 2021-05-18 Canon U.S.A., Inc. Apparatus, system and method for dynamic in-line spectrum compensation of an image

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005115631A (en) * 2003-10-07 2005-04-28 Olympus Corp Image display device and method
CN107131855A (en) * 2017-04-14 2017-09-05 中国科学院光电研究院 A kind of Spectral Confocal measuring system caliberating device and scaling method
CN110095066A (en) * 2019-03-04 2019-08-06 华中科技大学 Spectral Confocal signal peak wavelength quick and high-precision method for extracting based on Mean-shift
CN115700042A (en) * 2020-05-29 2023-02-03 株式会社半导体能源研究所 Optical functional device, functional panel, display device, input/output device, and data processing device
CN112462349A (en) * 2020-11-20 2021-03-09 武汉烽火凯卓科技有限公司 Wavelength calculation method, system, server and storage medium for spectrum confocal displacement sensor
CN113074814A (en) * 2021-03-11 2021-07-06 华中科技大学 Method and device for evaluating quality of spectral signal of dispersion confocal sensor
CN115235626A (en) * 2021-04-22 2022-10-25 熵智科技(深圳)有限公司 Method and device for acquiring light source spectrum image, computer equipment and medium
CN113108910A (en) * 2021-04-22 2021-07-13 熵智科技(深圳)有限公司 Light source spectral image acquisition method, device, equipment and storage medium
WO2023000907A1 (en) * 2021-07-23 2023-01-26 奥比中光科技集团股份有限公司 Method and apparatus for determining spectral image, terminal, and storage medium
CN114358053A (en) * 2021-12-16 2022-04-15 熵智科技(深圳)有限公司 Spectrum confocal multi-peak extraction method, module, computer equipment and storage medium
CN114370820A (en) * 2022-03-22 2022-04-19 武汉精立电子技术有限公司 Peak extraction method, detection method and system of spectrum confocal displacement sensor
CN114972003A (en) * 2022-05-27 2022-08-30 中国铁建重工集团股份有限公司 FPGA-based light stripe center extraction method, device, equipment and medium
CN116067625A (en) * 2023-01-29 2023-05-05 中电科思仪科技股份有限公司 System and method for testing long-time wavelength stability of built-in light source of spectrometer
CN116089824A (en) * 2023-03-30 2023-05-09 奥谱天成(厦门)光电有限公司 Peak extraction method, system and medium of spectrum confocal displacement sensor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
多路高速短消隐期线阵CCD图像数据存储设计;余达;龙科慧;徐东;赵莹;王冶;陈佳豫;刘金国;;液晶与显示(第02期);第284-289页 *
实时星图预处理的并行流水线算法;秦天沐;王伟东;王海涌;刘佳琪;;半导体光电(第02期);第257-263页 *

Also Published As

Publication number Publication date
CN116880907A (en) 2023-10-13

Similar Documents

Publication Publication Date Title
US6041148A (en) System and method for extracting image data
Johnston et al. FPGA implementation of a single pass connected components algorithm
CN106254782A (en) Image processing method and device and camera
US8885712B1 (en) Image frame management
CN110276444B (en) Image processing method and device based on convolutional neural network
CN110633610A (en) Student state detection algorithm based on YOLO
CN104680504A (en) Scene change detection method and device thereof
CN113556442B (en) Video denoising method and device, electronic equipment and computer readable storage medium
CN110365942A (en) A kind of real-time video intelligent analysis method and system
WO2015061964A1 (en) Simulataneous metadata extraction of moving objects
CN109032352B (en) Gesture signal processing method and device
CN114169362A (en) Event stream data denoising method based on space-time correlation filtering
CN111583265A (en) Method for realizing phishing behavior detection processing based on codec structure and corresponding semantic segmentation network system
CN116880907B (en) Real-time wavelength peak value extraction method, device, equipment and storage medium
CN114267025A (en) Traffic sign detection method based on high-resolution network and light-weight attention mechanism
CN111290305B (en) Multi-channel digital quantity acquisition and processing anti-collision method and system for multiple sets of inertial navigation systems
CN112882907B (en) User state determination method and device based on log data
CN109255771B (en) Image filtering method and device
CN205920142U (en) Oscilloscope
CN114140618A (en) Convolution characteristic caching method and device, electronic equipment and readable storage medium
KR101623321B1 (en) Apparatus and method for high speed searching of large scale video evidence in digital forensic
CN110674934B (en) Neural network pooling layer and operation method thereof
CN106445136B (en) Data waveform restoration methods, system and device
CN113128392A (en) Asynchronous target detection method, system, terminal and medium based on bionic image sensor
CN108183769B (en) Multi-channel multi-sampling-rate CAN bus data analysis method based on LabVIEW

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
GR01 Patent grant
GR01 Patent grant