Contour-constrained multi-layer fluorescent scanning path planning method and application thereof

By using contour-constrained multi-layer fluorescence scanning path planning and generating control masks using sample contour information, adaptive scanning is achieved, solving the problems of redundant data and mechanical loss in traditional schemes and improving scanning efficiency and imaging quality.

CN122171511BActive Publication Date: 2026-07-07SHENZHEN SHENGQIANG TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHENGQIANG TECH
Filing Date
2026-05-13
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In traditional multi-layer fluorescence scanning schemes, the fixed trajectory and point-by-point traversal of the entire domain cause the device to perform a large number of invalid movements in areas without samples, generating redundant imaging data, prolonging scanning time and aggravating hardware wear and positioning errors.

Method used

By pre-acquiring sample contour information to generate control masks, mechanical positioning and image acquisition are performed only on points marked as valid by the mask. A serpentine path adaptive scanning is adopted to avoid movement and acquisition of invalid points. The mask is uniformly reused for Z-axis layered scanning and multi-fluorescence channel acquisition.

Benefits of technology

It significantly reduces redundant imaging data, shortens scanning time, reduces mechanical wear, increases imaging throughput, and ensures image consistency across all levels and channels, thereby improving imaging integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122171511B_ABST
    Figure CN122171511B_ABST
Patent Text Reader

Abstract

The application provides a multi-layer fluorescence scanning path planning method based on contour constraint and application thereof, and belongs to the technical field of fluorescence scanning. The method aims to solve the problem of large redundant data and long time consumption caused by repeated and invalid collection of blank areas in traditional scanning. The method comprises the following steps: obtaining a pre-scanning image to identify a sample contour; generating a control mask for marking the execution or skipping state of each point and delivering the control mask to a scanning control device; during formal scanning, the control device sequentially follows a snake-shaped path, reads the mask state in advance before going to each point, skips invalid points, and only drives the motion shaft system to position and execute multi-layer Z-axis scanning and multi-channel fluorescence collection on valid points; wherein, all scanning layers and channels uniformly reuse the control mask. The application greatly reduces mechanical empty walking and redundant data, shortens the scanning cycle, and is mainly used for efficient scanning and collection in the field of microscopic imaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fluorescence microscopy scanning control technology, and in particular to a multi-layer fluorescence scanning path planning method based on contour constraints and its application. Background Technology

[0002] In fluorescence microscopy imaging in the fields of biomedicine and materials science, motorized stages or galvanometer scanning systems are often used to scan samples point by point, and three-dimensional multispectral information is obtained through the acquisition of multiple Z-axis layers and multiple fluorescence channels.

[0003] Traditional multilayer fluorescence scanning schemes typically pre-define a rectangular global scanning trajectory covering the entire slide or target area. The system drives the imaging optical path or stage to move continuously along parallel lines in a serpentine or grating manner, stopping sequentially at each predefined grid point, performing Z-axis elevation to complete multi-layer focusing and acquisition, and switching multiple fluorescence channels to capture images. This type of scheme treats all grid points as equally important, and the scanning trajectory remains a regular rectangle throughout, without adjusting the scanning range according to the actual shape, size, or distribution of the sample. Even if only localized biological tissue or fluorescently labeled materials are present within the scanning area, the system will still perform mechanical positioning, light source excitation, detector readout, and data storage for each blank background area.

[0004] Therefore, there is an urgent need for a multi-layer fluorescence scanning path planning method based on contour constraints and its application to solve the problems existing in the current technology. Summary of the Invention

[0005] This invention provides a multi-layer fluorescence scanning path planning method based on contour constraints and its application. The existing technology adopts a fixed trajectory global point-by-point traversal mode, which causes the device to perform a large number of invalid movements and repeated shooting in areas without samples. This not only generates massive amounts of redundant imaging data and seriously prolongs the overall scanning time, but also exacerbates hardware wear and positioning errors due to frequent invalid mechanical reversals at the contour edges.

[0006] The core technology of this invention is to pre-acquire the contour information of the sample and generate a control mask covering the entire scanning area. During the actual scanning, all Z-axis layered scanning and multi-fluorescence channel acquisitions reuse the control mask. Mechanical positioning and image acquisition are only performed on the points marked as valid by the mask, thereby achieving adaptive constraints on the scanning path and sample contour.

[0007] In a first aspect, the present invention provides a multi-layer fluorescence scanning path planning method based on contour constraints, the method comprising the following steps:

[0008] Acquire pre-scanned images and identify the contour information of samples based on the pre-scanned images;

[0009] Based on the contour information, a control mask corresponding to the scanning area is generated. The control mask is used to mark the execution or skip status of each scanning point in the scanning area.

[0010] Send the control mask to the scanning control device;

[0011] During the actual scanning process, the control scanning device traverses the grid points of the scanning area sequentially according to the preset serpentine path. Before driving the scanning device to the next grid point, the state of the next grid point in the control mask is read in advance.

[0012] If the status is skipped, the logic skips that point and continues to process subsequent points until a valid point with the status of execution is found.

[0013] If the status is "Executing", the drive scanning device will move directly to the coordinate position of the effective point, and perform multi-layer Z-axis scanning and multi-channel fluorescence acquisition upon arrival.

[0014] In particular, all scanning layers and all fluorescence channels along the Z-axis uniformly reuse the same control mask to determine the validity of the points.

[0015] Furthermore, based on the contour information of the samples identified in the pre-scanned images, specifically including:

[0016] A grayscale thresholding algorithm is used to distinguish the sample region from the background region in order to extract the closed contour boundary of the sample.

[0017] Furthermore, based on the contour information, a control mask corresponding to the scanned area is generated, specifically including:

[0018] Based on the resolution ratio between the pre-scan and the formal scan, the closed contour boundary is mapped to the formal scan coordinate system to obtain high-precision contour coordinates;

[0019] Establish a mapping relationship between two-dimensional coordinates and one-dimensional bit indexes. In the gridded points corresponding to the scanning area, mark the points located inside the high-precision contour coordinates as valid points and mark the points located outside as invalid points to generate a control mask in the form of a binary bitmap.

[0020] Furthermore, the control mask is sent to the scanning control device, specifically including:

[0021] The control mask is paginated, and a custom communication protocol is used to send the paginated mask data to the lower-level machine page by page.

[0022] The lower-level machine verifies, parses, and assembles the received paginated data to restore the complete control mask.

[0023] Furthermore, perform multi-layer Z-axis scanning, specifically including:

[0024] Obtain the system's basic offset and the fixed spacing between adjacent layers. Using the preset center layer as a reference, combine the system's basic offset, the fixed spacing between adjacent layers, and the current layer's ordinal number to calculate the cumulative offset distance of the current layer relative to the center layer.

[0025] Based on the XY coordinates of the current valid points, the reference Z value for fitting the sample surface is calculated in real time using a bilinear interpolation algorithm;

[0026] Based on the Z-value of the sample surface fitting reference, the system's basic offset, and the cumulative offset distance, the final Z-axis target position of the current layer is determined, and the Z-axis is driven to move to that position.

[0027] Furthermore, multi-layer Z-axis scanning and multi-channel fluorescence acquisition specifically include:

[0028] At each valid point, the Z-axis is controlled to move sequentially to multiple preset Z-axis target positions, and at each Z-axis target position, fluorescence image acquisition of at least one channel is performed;

[0029] In this process, the same control mask is used to determine the validity of all Z-axis positions and all fluorescence channels to ensure that the XY points scanned by each layer and each channel are completely consistent.

[0030] Furthermore, during the formal scanning process, a serpentine, reciprocating path is used to traverse the scanning area, including:

[0031] It advances line by line, reducing the idle travel of the shaft system by using the reverse movement of odd and even lines; and during the movement, it achieves discontinuous adaptive path scanning by dynamically filtering invalid points.

[0032] Secondly, the present invention provides a multi-layer fluorescence scanning path planning device based on contour constraints, comprising:

[0033] The contour recognition module is used to acquire pre-scanned images and recognize the contour information of samples based on the pre-scanned images.

[0034] The mask generation module is used to generate a control mask corresponding to the scanning area based on the contour information. The control mask is used to mark the execution or skip status of each scanning point in the scanning area.

[0035] The data transmission and control module is used to send the control mask to the scanning control device;

[0036] The scanning execution module is used to control the scanning device to traverse the grid points of the scanning area sequentially according to a preset serpentine path during the formal scanning process. Before driving the scanning device to the next grid point, it reads the status of the next grid point in the control mask in advance. If the status is "skip", the point is skipped directly and the subsequent points are processed until a valid point with the status "execute" is found. If the status is "execute", the scanning device is driven to move directly to the coordinate position of the valid point. After arriving, multi-layer Z-axis scanning and multi-channel fluorescence acquisition are performed. Among them, all scanning layers and all fluorescence channels of the Z-axis uniformly reuse the same control mask to determine the validity of the point.

[0037] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to execute the above-described contour-constrained multilayer fluorescence scanning path planning method.

[0038] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the multilayer fluorescence scanning path planning method based on contour constraints described above.

[0039] The main contributions and innovations of this invention are as follows:

[0040] 1. Significantly reduce redundant imaging data: By controlling the mask to skip blank areas outside the sample contour, invalid images are avoided from being acquired and stored. A single scan can significantly compress the total amount of data, saving storage space and subsequent data processing resources.

[0041] 2. Significantly shorten the total scanning time: The scanning system only needs to perform slow and precise positioning and imaging at valid sample points, and directly skip invalid points at high speed or logically. The overall scanning cycle is adaptively optimized according to the actual proportion of samples, thereby improving imaging throughput.

[0042] 3. Improve the consistency of points in multi-layer and multi-channel scanning: All Z-axis layers and fluorescence channels share the same control mask, ensuring that the images of each layer and channel are strictly aligned in spatial position, eliminating the registration deviation caused by path differences, and facilitating subsequent multi-color overlay and 3D reconstruction.

[0043] 4. Reduce mechanical wear and improve positioning stability: Reduces frequent reversing and useless reciprocating motion of the axis system in the edge area, suppresses vibration and wear caused by invalid idling and sudden stops, helps maintain motion positioning accuracy in long-term use, and improves the imaging integrity at the sample contour boundary.

[0044] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description

[0045] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0046] Figure 1 This is an architecture diagram of a contour-constrained multilayer fluorescence scanning path planning system according to an embodiment of the present invention.

[0047] Figure 2 This is a flowchart of a multi-layer fluorescence scanning path planning method based on contour constraints according to an embodiment of the present invention;

[0048] Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0050] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0051] This invention provides a multi-layer fluorescence scanning path planning method and system based on contour constraints, which aims to solve the problems of large amount of redundant data, long scanning time and serious mechanical wear caused by using a fixed rectangular global trajectory for irregular samples in traditional fluorescence scanning.

[0052] like Figure 1As shown, this solution adopts a distributed architecture with collaborative control between a host computer and a slave computer. The host computer, as the main control computing unit, is responsible for sample contour acquisition, coordinate conversion, bitmap mask generation, scanning parameter configuration, and mask data paging and distribution. The slave computer, as the motion control and acquisition execution unit, completes protocol data reception and parsing, global mask cache restoration, motion path planning, multi-axis linkage control, and multi-channel fixed-shot acquisition by the fluorescence camera. The host and slave computers interact with each other through a dedicated custom communication protocol. Relying on the unified judgment logic of the contour mask, a complete contour-constrained intelligent scanning control system is constructed, which can adapt to various fluorescence scanning conditions such as single-layer, multi-layer, single-channel, and multi-channel scanning.

[0053] Example 1

[0054] In combination with the above Figure 1 and Figure 2 The specific implementation steps of the present invention are as follows:

[0055] Step S100: Acquire pre-scanned images and identify sample contour information

[0056] The host computer first performs a low-resolution rapid pre-scan of the scanning area to acquire a full-area grayscale image. A grayscale thresholding algorithm is then used to distinguish sample regions from background regions on the pre-scanned image. The grayscale threshold can be determined based on a preset empirical value, or an adaptive thresholding algorithm (such as Otsu's method) can be used to automatically calculate the optimal segmentation threshold based on the grayscale image histogram. Specifically, regions with grayscale values ​​greater than or equal to the threshold are identified as sample regions, while regions with grayscale values ​​less than the threshold are identified as background regions. An edge detection algorithm is then used to extract the closed contour boundaries of the sample regions, thereby obtaining the complete closed contour information of the samples.

[0057] Step S200: Generate a control mask based on the contour information

[0058] The host computer linearly maps the low-precision contour coordinates extracted in step S100 to the high-resolution scanning coordinate system of the formal scan based on the resolution ratio between the pre-scan and the formal scan, thereby obtaining the high-precision contour coordinates.

[0059] Subsequently, a unified mapping relationship between two-dimensional coordinates and one-dimensional bit indices is established. Let the number of points in the scan grid along the X-axis be X_count, and the number of points along the Y-axis be Y_count. For a scan point with coordinates (x, y), where , Its bit index in the one-dimensional mask array is calculated using the following formula:

[0060]

[0061] The byte position corresponding to this bit index is (Integer division), the bit offset within a byte is (Where bit offset 0 corresponds to the most significant bit of the byte, that is, bit offset 0 corresponds to the 7th bit of the byte, and bit offset 7 corresponds to the 0th bit, that is, the bit arrangement method of MSB high-order first is adopted.) In this way, the global scan points are converted into the byte positions and bit numbers corresponding to the mask array.

[0062] In the gridded points corresponding to the scanning area, points located inside the high-precision contour coordinates are marked as valid points, and points located outside are marked as invalid points, using the closed contour boundary as the criterion. In the control mask, the corresponding bit position for valid points is binary "0" (indicating that a scanning action needs to be performed), and the corresponding bit position for invalid points is binary "1" (indicating that the point is skipped). This generates a binary bitmap control mask covering the entire scanning field of view. Each scanning point occupies 1 bit in this control mask, and the total byte length of the mask is [missing information]. (Integer division) enables efficient storage and real-time retrieval.

[0063] Step S300: Send the control mask to the scanning control device

[0064] After the host computer generates the complete control mask, it calculates the total byte length of the mask. If the total number of grid points... If the number of pixels exceeds the preset maximum single-page capacity (e.g., 7500 pixels), a pagination transmission mechanism is activated, splitting the control mask into multiple pages, each containing mask data of no more than 7500 pixels. Total number of pages. (Round up). Taking a grid size of 400×400 as an example, the total number of pixels is 160,000, and the total number of pages is... = 22 pages, with each page's mask data length not exceeding = 938 bytes.

[0065] The host computer encapsulates each page's data in a fixed frame format. Each frame contains, in sequence: device address (1 byte, fixed value 0x01), function code (1 byte, fixed value 0x67), length field (1 byte), read / write status (1 byte, write identifier), X-axis point count (4 bytes, integer), Y-axis point count (4 bytes, integer), current page number (1 byte, numbered starting from 0), total number of pages (1 byte), current page mask data (variable-length byte array, each byte containing status information for 8 points, MSB high-order byte priority), and CRC16 checksum (2 bytes, little-endian byte order). A page-by-page transmission and frame-based acknowledgment mechanism is used for distribution.

[0066] The lower-level machine performs a CRC16 check on each received frame. If the check passes, it determines the page's offset within the complete mask based on the current page number and the total number of pages, and then assembles the current page mask data into the local memory buffer according to page order. After all pages have been received, the complete control mask is restored and stored locally. In subsequent formal scanning, the lower-level machine uniformly reuses the coordinate index conversion logic identical to that in step S200; that is, for a target point with coordinates (x, y), it calculates the coordinates using the following logic: Calculate the bit index, then locate the byte and bit offset according to the same rules, and read the mask bit status in real time to determine the position.

[0067] The host computer simultaneously sends the hardware parameters required for scanning, including the overall system offset, through the protocol. Fixed spacing between adjacent layers Preset number of layers The sparse height grid data established during the pre-scanning stage is received by the lower-level machine and stored in local memory for use during scanning.

[0068] Step S400: Traverse the scanned area using a serpentine path and determine the status of the points in real time.

[0069] The scanning device employs a serpentine reciprocating path during the actual scanning process. Assume the scanning grid comprises... Rows, in rows from row 0 to row 1 Proceed line by line. For even-numbered rows (row number y is even), proceed from left to right (x increments from 0 to...). The direction of movement; for odd-numbered rows (row number y is odd), the movement is from right to left (x starts from...). The movement direction decreases to 0. By moving in reverse order between odd and even rows, after each row is scanned, it is only necessary to step along the Y-axis by one row spacing to directly connect from the end of the current row to the beginning of the next row. This transforms the inter-row connection movement into a short-distance direct crossing, reduces the idle travel of the axis system, and improves the continuity of movement.

[0070] During the serpentine path movement, before driving the motion axis system to the next grid point coordinate, the lower-level machine first calculates the byte position and bit offset of the point in the control mask using the coordinate index conversion logic of the next grid point coordinate (x, y), and reads the status value of the bit. This determination step is executed sequentially according to the scan cycle in the main loop of the control program. If the reading result is "1" (invalid point), the point is skipped directly in the logic layer, and no positioning command to the motion controller or trigger acquisition command is issued to the camera controller. The lower-level machine then immediately calculates and processes the next grid point on the path. If the reading result is "0" (valid point), a positioning command is issued to the motion controller, driving the axis system to move precisely to the (x, y) coordinate position, and step S500 is entered to perform the acquisition action.

[0071] Therefore, invalid points are completely excluded from the actual motion trajectory, and the axis system moves directly between valid points. For areas with multiple consecutive invalid points, the axis system can cross them at a high speed without deceleration or stopping; precise positioning and deceleration are only performed when the next valid point is encountered. Through the above dynamic filtering mechanism, the scanning trajectory performs precise positioning and imaging only above the valid sample area, and quickly crosses the blank background area, achieving intermittent adaptive path scanning.

[0072] Step S500: Perform multi-layer Z-axis scanning and multi-channel fluorescence acquisition on the effective sites.

[0073] Once the scanning device reaches a valid point, the system controls the Z-axis to move sequentially to multiple preset Z-axis target positions based on that point, and performs fluorescence image acquisition for at least one channel at each Z-axis target position.

[0074] The specific implementation method of multi-layer Z-axis scanning is as follows: Let the preset number of layers be... Each floor is numbered as follows The layer number of the central layer is... .when When the number is odd, the center layer corresponds to a unique intermediate layer; for example, with 5 layers, the center layer is the 2nd layer (numbered starting from 0). When the number of layers is even, the center layer is taken as the lower middle layer as the reference. For example, with 4 layers, the center layer is layer 1 (numbered starting from 0). In this case, the offset distance of each layer relative to the center reference layer is still calculated according to the principle of symmetry. Using the center layer as the reference plane, the fixed spacing between adjacent layers is determined according to the system. (Hardware parameters, namely the fixed Z-axis spacing between two adjacent layers, a constant) and the overall system offset. (Constant value), calculate the cumulative offset distance of the current layer l relative to the central layer. :

[0075]

[0076] when When the value is 1 (i.e., single-layer scanning condition), there is only one layer with l=0, which is the center layer, and the cumulative offset distance is... Degenerates to zero, and the Z-axis positioning is determined solely by the surface fitting reference Z-value and the overall system offset.

[0077] To accommodate potential surface undulations in the samples, the system incorporates a surface fitting mechanism. During the pre-scanning phase, the host computer uses focusing or laser ranging to sample the sample surface height at sparse grid intervals (e.g., every 5 or 10 formal scan points), establishing a sparse height grid covering the scan area. This sparse height grid is stored as a two-dimensional array on the slave computer, with each element recording the Z-axis height value measured at the corresponding sparse grid node. During the formal scan, the slave computer substitutes the (x, y) coordinates of the current valid point into this sparse height grid, determining the position and height of the grid cell containing that point and its four neighboring nodes. A weighted calculation is then performed using bilinear interpolation to calculate the sample surface fitting reference Z-value for that point in real time. Specifically, let the height values ​​of the four neighboring nodes be... The normalized relative position of the current point within the grid cell is The formula for calculating the fitting reference Z value is:

[0078] First, interpolate along the X direction to obtain and Then interpolate along the Y direction to obtain the final result. .

[0079] Fit the reference Z value to the sample surface. Overall system offset and the cumulative offset distance of the current layer Algebraic addition yields the final Z-axis target position for the current layer:

[0080]

[0081] After the lower-level machine drives the Z-axis to precisely position itself at the target height, it completes the fluorescence image acquisition and time-delay stabilization of that point and layer. The system iterates through the currently valid points, numbered from 0 to... All layers were processed to complete the surface-following multi-layer Z-axis scanning acquisition.

[0082] At each Z-axis level of the same effective point, the system sequentially switches between different fluorescence channels to acquire multi-channel images according to the preset fluorescence acquisition configuration. For example, when three fluorescence channels—blue, green, and red—are configured, the system sequentially switches to the corresponding excitation source and filter assembly at each Z-axis level to capture fluorescence images of each channel.

[0083] Throughout the entire multi-layer Z-axis scanning and multi-channel fluorescence acquisition process, all Z-axis layers and all fluorescence channels uniformly reuse the same control mask restored and cached in step S300 to determine the validity of points. That is, when switching between different layers or channels, the mask data is not regenerated or replaced, and the contour extraction or mask distribution process is not repeated. The scanned XY point set remains completely consistent. This unified reuse mechanism ensures strict spatial alignment of images in each layer and channel, avoiding repeated traversal of invalid points in multi-layer, multi-channel scenarios. It also eliminates image registration deviations between layers and channels introduced by path differences, providing a precisely aligned image sequence for subsequent multi-color overlay and 3D reconstruction.

[0084] In summary, this invention achieves intelligent adaptive scanning of irregular samples by organically combining pre-scan contour extraction, bitmap mask generation, paginated distribution, real-time mask determination of serpentine paths, multi-layer Z-axis surface fitting, and multi-channel unified mask reuse. This significantly reduces invalid acquisition and mechanical loss, and is fully compatible with various working modes such as single-layer single-channel and multi-layer multi-channel.

[0085] Example 2

[0086] Another embodiment of the present invention provides a multilayer fluorescence scanning path planning system based on contour constraints, such as... Figure 1 As shown, this system corresponds to the above-described method embodiments.

[0087] The system includes a contour recognition module, a mask generation module, a data transmission and control module, and a scan execution module.

[0088] The contour recognition module is deployed in the host computer to control the scanning device to perform low-resolution pre-scanning of the target area to obtain a full-domain grayscale image, and to use a grayscale threshold segmentation algorithm to distinguish the sample area from the background area and extract the closed contour information of the sample.

[0089] The mask generation module is deployed in the host computer and connected to the contour recognition module. It is used to receive closed contour information, map the contour coordinates to a high-resolution coordinate system according to the resolution ratio of the pre-scan and the formal scan, establish the mapping relationship between two-dimensional coordinates and one-dimensional bit index, and generate a control mask in the form of a binary bitmap. The control mask marks the points inside the contour as valid points and the points outside the contour as invalid points.

[0090] The data transmission and control module, with its sending end deployed on the host computer and its receiving end deployed on the slave computer, is used to send the control mask page by page to the slave computer according to the paging transmission protocol. The slave computer then performs verification, assembly, and reconstruction of the paging data before storing it locally in a cache. This module is also responsible for sending scanning parameters such as the overall system offset, fixed spacing between adjacent layers, number of layers, and sparse height grid.

[0091] The scanning execution module is deployed in the lower-level machine and connected to the receiving end of the data transmission and control module. During the actual scanning process, it reads the status of the next grid point from the locally cached control mask before driving the scanning device to the next grid point, following a preset serpentine traversal sequence. If the status is invalid, it skips the point and continues processing subsequent points; if the status is valid, it drives the scanning device to the coordinates of the valid point and performs multi-layer Z-axis scanning and multi-channel fluorescence acquisition. All scanning layers and fluorescence channels along the Z-axis reuse the same control mask for point validity determination.

[0092] Example 3

[0093] This embodiment also provides an electronic device, see reference. Figure 3 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.

[0094] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.

[0095] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0096] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.

[0097] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the contour constraint-based multilayer fluorescence scanning path planning methods in the above embodiments.

[0098] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.

[0099] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0100] Input / output device 408 is used to input or output information.

[0101] Example 4

[0102] This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the contour constraint-based multilayer fluorescence scanning path planning method according to Embodiment 1.

[0103] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0104] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0105] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 2 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.

[0106] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0107] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.

Claims

1. A multi-layer fluorescence scanning path planning method based on contour constraints, characterized in that, Includes the following steps: Acquire a pre-scanned image, and identify the contour information of the sample based on the pre-scanned image; Based on the contour information, a control mask corresponding to the scanning area is generated. The control mask is used to mark the execution or skip status of each scanning point in the scanning area. The control mask is sent to the scanning control device; During the actual scanning process, the control scanning device traverses the grid points of the scanning area sequentially according to the preset serpentine path. Before driving the scanning device to the next grid point, the state of the next grid point in the control mask is read in advance. If the status is skipped, the logic skips that point and continues to process subsequent points until a valid point with the status of execution is found. If the status is "Executing", the drive scanning device will move directly to the coordinate position of the effective point, and perform multi-layer Z-axis scanning and multi-channel fluorescence acquisition upon arrival. In this process, all scanning layers and all fluorescence channels along the Z-axis uniformly reuse the same control mask for determining the validity of the points; the execution of multi-layer Z-axis scanning specifically includes: Obtain the system's basic offset and the fixed spacing between adjacent layers, and using the preset center layer as a reference, calculate the cumulative offset distance of the current layer relative to the center layer by combining the fixed spacing between adjacent layers and the current layer number; Based on the XY coordinates of the current valid points, the reference Z value for fitting the sample surface is calculated in real time using a bilinear interpolation algorithm; Based on the Z-value of the sample surface fitting reference, the system basic offset, and the cumulative offset distance, the final Z-axis target position of the current layer is determined, and the Z-axis is driven to move to that position.

2. The method according to claim 1, characterized in that, Based on the contour information of the pre-scanned image, the identification of the sample specifically includes: A grayscale thresholding algorithm is used to distinguish the sample region from the background region in the pre-scanned image in order to extract the closed contour boundary of the sample.

3. The method according to claim 2, characterized in that, Based on the contour information, a control mask corresponding to the scanned area is generated, specifically including: Based on the resolution ratio between the pre-scan and the formal scan, the closed contour boundary is mapped to the formal scan coordinate system to obtain high-precision contour coordinates; A mapping relationship between two-dimensional coordinates and one-dimensional bit indexes is established. In the gridded points corresponding to the scanning area, points located inside the high-precision contour coordinates are marked as valid points, and points located outside are marked as invalid points, so as to generate the control mask in the form of a binary bitmap.

4. The method according to claim 1, characterized in that, Sending the control mask to the scanning control device specifically includes: The control mask is paginated, and the paginated mask data is sent to the lower-level machine page by page using a custom communication protocol; The lower-level machine verifies, parses, and assembles the received pagination data to restore the complete control mask.

5. The method according to claim 1, characterized in that, The multi-layer Z-axis scanning and multi-channel fluorescence acquisition specifically include: At each of the effective points, the Z-axis is controlled to move sequentially to multiple preset Z-axis target positions, and at each Z-axis target position, fluorescence image acquisition of at least one channel is performed; In this process, the same control mask is used to determine the validity of all Z-axis positions and all fluorescence channels to ensure that the XY points scanned by each layer and each channel are completely consistent.

6. The method according to claim 1, characterized in that, During the formal scanning process, a serpentine, reciprocating path is used to traverse the scanning area, including: It advances line by line, reducing the idle travel of the shaft system by using the reverse movement of odd and even lines; and during the movement, it achieves discontinuous adaptive path scanning by dynamically filtering invalid points.

7. A system for implementing the contour-constrained multilayer fluorescence scanning path planning method according to any one of claims 1 to 6, characterized in that, include: A contour recognition module is used to acquire a pre-scanned image and recognize the contour information of a sample based on the pre-scanned image. The mask generation module is used to generate a control mask corresponding to the scanning area based on the contour information. The control mask is used to mark the execution or skip status of each scanning point in the scanning area. The data transmission and control module is used to send the control mask to the scanning control device; The scanning execution module is used to control the scanning device to traverse the grid points of the scanning area sequentially according to a preset serpentine path during the formal scanning process. Before driving the scanning device to the next grid point, it reads the status of the next grid point in the control mask in advance. If the status is "skip", the point is skipped directly and the subsequent points are processed until a valid point with the status "execute" is found. If the status is "execute", the scanning device is driven to move directly to the coordinate position of the valid point. After arriving, multi-layer Z-axis scanning and multi-channel fluorescence acquisition are performed. Among them, all scanning layers and all fluorescence channels of the Z-axis uniformly reuse the same control mask to determine the validity of the point.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the contour-constrained multilayer fluorescence scanning path planning method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the contour-constrained multilayer fluorescence scanning path planning method according to any one of claims 1 to 6.