Optical fiber center pixel coordinate extraction method and device, electronic equipment

By receiving fiber optic signals and traversing using pixel thresholds and preset range windows, the pixel coordinates of the fiber center are accurately located, solving the problem of inaccurate fiber center pixel coordinate positioning in existing technologies and improving efficiency and accuracy.

CN116452662BActive Publication Date: 2026-04-14WUXI HISKY MEDICAL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUXI HISKY MEDICAL TECH
Filing Date
2023-04-03
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies cannot effectively and accurately locate the pixel coordinates of the fiber center, which usually requires manual marking, resulting in low efficiency and poor accuracy.

Method used

By receiving the target signal transmitted through the optical fiber, pixels in the target image whose pixel values ​​exceed the first pixel threshold are selected as candidate optical fiber centers. The candidate optical fiber centers are traversed using a preset range window to find candidate optical fiber centers that meet the pixel value requirements, forming a candidate optical fiber center queue. Then, pixels whose pixel values ​​exceed the second pixel threshold are selected from the candidate optical fiber center queue as optical fiber centers.

Benefits of technology

It achieves accurate positioning of the center pixel coordinates of optical fiber, improves the accuracy of pixel coordinate extraction, and solves the problems of low efficiency and poor accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116452662B_ABST
    Figure CN116452662B_ABST
Patent Text Reader

Abstract

The application discloses a kind of optical fiber center pixel coordinate extraction method, device, electronic equipment.The method comprises: receiving the target signal of optical fiber transmission, wherein the target signal is the signal of the target image of optical fiber transmission;Based on the target image of target signal transformation, select the pixel point of pixel value in target image exceeding first pixel threshold as candidate optical fiber center;Through preset range window to the candidate optical fiber center is traversed, find the candidate optical fiber center that meets the requirement of pixel value, form candidate optical fiber center queue;From candidate optical fiber center queue, select the pixel point of pixel value exceeding second pixel threshold as optical fiber center, the pixel coordinate of pixel point is as the pixel coordinate of optical fiber center, wherein second pixel threshold is higher than first pixel threshold.Solved in the related art there is no effective means to accurately locate the pixel coordinate of optical fiber center, usually need artificial marking, low efficiency, the problem of poor accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fiber optic imaging, and more specifically, to a method, apparatus, and electronic device for extracting pixel coordinates at the center of a fiber optic cable. Background Technology

[0002] Microscopic endoscopes are widely used in medical observation and testing. Fiber optics and galvanometers are crucial components of microscopic endoscopes. A single fiber optic cable typically consists of tens of thousands of fiber units, each with a fixed center position. However, in practice, due to limitations in galvanometer scanning accuracy and the bending and deformation of the fiber during use, it's impossible to guarantee that each scan will be performed at the exact same position, even with a fixed end face. Therefore, over time, the galvanometer scanning position and the fiber position will change, and consequently, the center positions of the individual fiber units within the entire fiber will also change. This phenomenon is known as fiber drift.

[0003] Solving the fiber optic drift problem requires first determining the pixel coordinates of the fiber center of each fiber unit, and then using these coordinates to correct the image output from the fiber. However, there is currently no effective method to accurately locate the pixel coordinates of the fiber center; manual marking is usually required, which is inefficient and inaccurate.

[0004] There is currently no effective solution to the problem that there is no effective means to accurately locate the pixel coordinates of the center of the optical fiber in related technologies, which usually requires manual marking, resulting in low efficiency and poor accuracy. Summary of the Invention

[0005] The main objective of this application is to provide a method, apparatus, and electronic device for extracting pixel coordinates at the center of an optical fiber, in order to solve the problem that there is no effective means to accurately locate the pixel coordinates at the center of an optical fiber in related technologies, which usually requires manual marking, resulting in low efficiency and poor accuracy.

[0006] To achieve the above objectives, according to one aspect of this application, a method for extracting pixel coordinates of an optical fiber center is provided. The method includes: receiving a target signal transmitted through an optical fiber, wherein the target signal is a signal of a target image transmitted through the optical fiber; selecting pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate optical fiber centers based on the target image converted from the target signal; traversing the candidate optical fiber centers through a preset range window to find candidate optical fiber centers that meet the pixel value requirements, forming a candidate optical fiber center queue; selecting pixels whose pixel values ​​exceed a second pixel threshold from the candidate optical fiber center queue as optical fiber centers, and using the pixel coordinates of the selected pixels as the pixel coordinates of the optical fiber center, wherein the second pixel threshold is higher than the first pixel threshold.

[0007] Optionally, selecting pixels with pixel values ​​exceeding a first pixel threshold as candidate fiber centers based on the target image converted from the target signal includes: determining a central region of the target image based on the target image converted from the target signal, wherein the central region is a rectangular region centered on the center of the target image and with a size that is a preset proportion of the size of the target image; determining the first pixel threshold based on the pixel values ​​of all pixels in the central region, wherein the first pixel threshold is a first preset proportion of the average pixel value of all pixels in the central region; and traversing the pixels in the target image to select pixels with pixel values ​​exceeding the first pixel threshold as candidate fiber centers.

[0008] Optionally, the preset range window is a square neighborhood range centered on the traversed pixel, and the pixel value requirement includes making the traversed pixel the pixel with the highest pixel value within the square neighborhood range.

[0009] Optionally, traversing the candidate fiber centers through a preset range window to find candidate fiber centers that meet the pixel value requirements and forming a candidate fiber center queue includes: selecting unmarked candidate fiber centers; determining the pixel values ​​of the pixel at the location of the candidate fiber center and multiple surrounding pixels included in the preset range window; determining whether the candidate fiber center meets the pixel value requirements based on the pixel values ​​of each pixel in the preset range window, and marking the candidate fiber center; if there are still unmarked candidate fiber centers among the candidate fiber centers, continuing to select unmarked candidate fiber centers and determine whether they meet the pixel value requirements, until all candidate fiber centers have been marked.

[0010] Optionally, selecting a pixel whose pixel value exceeds a second pixel threshold as an optical fiber center from the candidate optical fiber center queue includes: determining the second pixel threshold based on the pixel values ​​of all pixels in the intermediate region, wherein the second pixel threshold is a second preset ratio of the average pixel value of all pixels in the intermediate region; traversing the candidate optical fiber centers in the candidate optical fiber center queue, and selecting a candidate optical fiber center whose pixel value exceeds the second pixel threshold as an optical fiber center.

[0011] Optionally, the size of the intermediate region is half the size of the target image.

[0012] Optionally, the first preset ratio is 3%-5%, and the second preset ratio is 10%-30%.

[0013] To achieve the above objectives, according to another aspect of this application, a pixel coordinate extraction device for the center of an optical fiber is provided, comprising: a receiving module for receiving a target signal transmitted through an optical fiber, wherein the target signal is a signal of a target image transmitted through an optical fiber; a first selection module for selecting pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate optical fiber centers based on the target image converted from the target signal; a searching module for traversing the candidate optical fiber centers through a preset range window to find candidate optical fiber centers that meet the pixel value requirements and forming a candidate optical fiber center queue; and a second selection module for selecting pixels whose pixel values ​​exceed a second pixel threshold as optical fiber centers from the candidate optical fiber center queue, and using the pixel coordinates of the pixels as the pixel coordinates of the optical fiber centers, wherein the second pixel threshold is higher than the first pixel threshold.

[0014] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is provided for storing a program that executes the pixel coordinate extraction method for the center of an optical fiber as described in any of the preceding claims.

[0015] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the pixel coordinate extraction method for the center of the optical fiber as described in any one of the above.

[0016] This application, after receiving the target signal transmitted via optical fiber (the target signal being the target image signal transmitted via optical fiber), selects pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate fiber centers based on the target image converted from the target signal. It then iterates through the candidate fiber centers using a preset range window to find those meeting the pixel value requirements, forming a candidate fiber center queue. From this queue, pixels whose pixel values ​​exceed a second pixel threshold are selected as fiber centers, and their pixel coordinates are used as the pixel coordinates of the fiber center. The second pixel threshold is higher than the first pixel threshold. This achieves accurate positioning of the fiber center's pixel coordinates, improving the accuracy of pixel coordinate extraction. Furthermore, it solves the problem in related technologies where there is no effective means to accurately locate the pixel coordinates of the fiber center, typically requiring manual marking, which is inefficient and inaccurate. Attached Figure Description

[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a flowchart of a method for extracting pixel coordinates of the center of an optical fiber according to an embodiment of this application;

[0019] Figure 2 This is a schematic diagram of a pixel coordinate extraction device for the center of an optical fiber according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a method for extracting pixel coordinates of the center of an optical fiber according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0025] Step S101: Receive the target signal transmitted through the optical fiber, wherein the target signal is the signal of the target image transmitted through the optical fiber.

[0026] Step S102: Based on the target image converted from the target signal, select the pixels in the target image whose pixel values ​​exceed the first pixel threshold as candidate fiber centers;

[0027] Step S103: Traverse the candidate fiber centers through a preset range window to find candidate fiber centers that meet the pixel value requirements and form a candidate fiber center queue.

[0028] Step S104: Select the pixel with a pixel value exceeding the second pixel threshold from the candidate fiber center queue as the fiber center, and use the pixel coordinates of the pixel as the pixel coordinates of the fiber center, wherein the second pixel threshold is higher than the first pixel threshold.

[0029] The above steps involve receiving the target signal transmitted via optical fiber (the target image signal transmitted via optical fiber); based on the target image converted from the target signal, pixels with pixel values ​​exceeding a first pixel threshold are selected as candidate fiber centers; the candidate fiber centers are traversed through a preset range window to find those meeting the pixel value requirements, forming a candidate fiber center queue; from this queue, pixels with pixel values ​​exceeding a second pixel threshold are selected as fiber centers, and their pixel coordinates are used as the pixel coordinates of the fiber center. The second pixel threshold is higher than the first pixel threshold. This achieves accurate positioning of the fiber center's pixel coordinates, improving the accuracy of pixel coordinate extraction. Furthermore, it solves the problem in related technologies where there is no effective means to accurately locate the pixel coordinates of the fiber center, typically requiring manual marking, which is inefficient and inaccurate.

[0030] The entity executing the above steps can be a fiber optic imaging device. This device can be equipped with a processor, calculator, or controller for data processing to perform the data processing operations in the above steps, such as steps S101-S104. The fiber optic imaging device can be used in fiber optic endoscope systems, where the fiber optic cable connects the endoscope lens to the fiber optic imaging device, displaying the images acquired by the endoscope lens.

[0031] Since optical fibers consist of many fiber units, bending of the fiber causes movement between these units, resulting in offsets between image regions of different fiber units in the output image. Therefore, it is necessary to determine the fiber centers of different image regions in the output image, and based on the differences in pixels near each fiber center, determine the correction coefficients for the corresponding image regions, and then correct the pixels in those regions.

[0032] There is no effective means in related technologies to determine the fiber center of different image regions in the output image. Considering that the fiber center usually corresponds to the pixel with the higher pixel value in the image region, this embodiment performs two filtering operations using a first pixel threshold and a second pixel threshold, and performs filtering between the two filtering operations based on pixel value requirements to determine the pixel coordinates of the fiber center of each image region in the target image.

[0033] The aforementioned target signal can be the photoelectric signal of the target image actually output by the optical fiber. Based on this photoelectric signal, the photoelectric signal can be converted into a target image through imaging technology in related technologies. It should be noted that the target image converted here is an image with optical fiber drift, that is, the image before correction. This image is a whole, without the division of image regions or the marking of the center of the optical fiber.

[0034] In this embodiment, the pixels of the target image are first filtered using a first pixel threshold, which is close to 0, in order to remove pixels that are unlikely to be at the center of the optical fiber. Since the pixel value at the center of the optical fiber is higher, pixels with pixel values ​​close to 0 can be removed first.

[0035] The purpose of traversing the candidate fiber centers through a preset range window is to determine whether the remaining candidate fiber centers meet the pixel value requirements. These pixel value requirements can be used to determine the pixel value difference characteristics between the candidate fiber center and its surrounding pixels.

[0036] For example, the pixel value requirement mentioned above can be that the pixel value of the candidate fiber center is not less than the pixel value of the surrounding adjacent pixels, so that the candidate fiber center that meets the requirement is the pixel with the largest pixel value in the imaging area, which is more in line with the actual situation of the fiber center.

[0037] After obtaining the candidate fiber center queue, the candidate fiber centers in the queue are filtered based on pixels with a second pixel threshold. Pixels whose pixel values ​​reach the second pixel threshold are designated as fiber centers. This allows for the accurate and efficient extraction of the pixel coordinates of the fiber centers from the target signal.

[0038] Optionally, selecting pixels with pixel values ​​exceeding a first pixel threshold as candidate fiber centers based on the target image converted from the target signal includes: determining a central region of the target image based on the target image converted from the target signal, wherein the central region is a rectangular region centered on the center of the target image and with a size that is a preset proportion of the size of the target image; determining a first pixel threshold based on the pixel values ​​of all pixels in the central region, wherein the first pixel threshold is a first preset proportion of the average pixel value of all pixels in the central region; and traversing the pixels in the target image to select pixels with pixel values ​​exceeding the first pixel threshold as candidate fiber centers.

[0039] The first pixel threshold and the second pixel threshold mentioned above can both be determined based on the pixel values ​​of the pixels in the middle region of the target image. Specifically, the first pixel threshold can be determined by a first preset ratio of the average pixel values ​​of all pixels in the middle region, and the second pixel threshold can be determined by a second preset ratio of the average pixel values.

[0040] Optionally, the first preset ratio is 3%-5%, and the second preset ratio is 10%-30%. Preferably, in this embodiment, the first preset ratio is 5%, and the second preset ratio is 30%.

[0041] The size of the aforementioned intermediate region is half the size of the target image. For example, if the target image is 1024*1024 pixels, the intermediate region can be a rectangular area bounded by a width of 256–768 pixels and a height of 256–768 pixels. It should be noted that the preset ratio of the height of the intermediate region to the height of the target image, and the preset ratio of the width of the intermediate region to the width of the target image, have a lower limit of 5% to 45% and an upper limit of 55% to 95%.

[0042] The larger the size of the middle region, the closer the calculated first and second pixel thresholds will be to the actual situation, but the computational load will be greater. Therefore, the size of the middle region can be selected according to actual needs.

[0043] Since the target image contains different pixels in different frames, the pixel values ​​can vary significantly. Using the central region of the target image to determine the first and second pixel thresholds better reflects the characteristics of the target image in the current frame, resulting in more accurate screening results. Furthermore, using fixed first and second pixel thresholds across different frames avoids significant errors in determining the fiber optic center between frames due to large differences in pixel values.

[0044] Optionally, the preset range window is a square neighborhood centered on the traversed pixel. The pixel value requirement includes ensuring that the traversed pixel is the pixel with the highest pixel value within the square neighborhood. That is, the pixel value of non-center pixels within the square neighborhood is less than or equal to the pixel value of the traversed pixel.

[0045] The aforementioned preset range window is used to determine the neighboring pixels of the pixel at the center of the candidate optical fiber. In this embodiment, a 3*3 square area can be selected. The center of the preset range window is the center of the candidate optical fiber, and the other 8 pixels are the pixels directly adjacent to the center of the candidate optical fiber in 8 directions.

[0046] The pixel value requirement is that the pixel value of a non-center neighboring pixel is less than or equal to the pixel value of the corresponding pixel of the candidate fiber center.

[0047] Optionally, traversing the candidate fiber centers through a preset range window to find candidate fiber centers that meet the pixel value requirements and forming a candidate fiber center queue includes: selecting unmarked candidate fiber centers; determining the pixel values ​​of the pixels at the candidate fiber center location and multiple surrounding pixels within the preset range window; determining whether the candidate fiber center meets the pixel value requirements based on the pixel values ​​of each pixel within the preset range window, and marking the candidate fiber center; if there are still unmarked candidate fiber centers, continuing to select unmarked candidate fiber centers and determine whether they meet the pixel value requirements, until all candidate fiber centers have been marked.

[0048] The candidate fiber centers are traversed within a preset window range. The pixel value of each candidate fiber center is checked to see if it meets the pixel value requirements. If it does, it can be added to the candidate fiber center queue; otherwise, it is not added to the candidate fiber center queue. This completes the screening of candidate fiber centers based on pixel value requirements.

[0049] Optionally, selecting a pixel whose pixel value exceeds a second pixel threshold as the fiber center from the candidate fiber center queue includes: determining a second pixel threshold based on the pixel values ​​of all pixels in the middle region, wherein the second pixel threshold is a second preset ratio of the average pixel value of all pixels in the middle region; traversing the candidate fiber centers in the candidate fiber center queue and selecting a candidate fiber center whose pixel value exceeds the second pixel threshold as the fiber center.

[0050] Candidate fiber centers are selected from the candidate fiber center queue by filtering pixels with values ​​reaching the second pixel threshold. Pixels with pixel values ​​reaching the second pixel threshold are then used as fiber centers. This allows for the accurate and efficient extraction of the pixel coordinates of the fiber center from the target signal.

[0051] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0052] It should be noted that this application also provides an optional implementation method, which will be described in detail below.

[0053] This embodiment provides an algorithm for extracting the fiber optic center of a positioning image:

[0054] (1) First, pixels with gray values ​​below the threshold are marked as having been examined and are considered not to be the center of the fiber optic cable. These pixels will not be considered in subsequent processes.

[0055] Threshold setting method: Set the threshold (5% of the average gray value) based on the average gray value of the central rectangular area within the fiber bundle range of the positioning image.

[0056] If the image size is width * height, then the central rectangular area is defined as a rectangular region bounded by 0.25 * width to 0.75 * width and 0.25 * height to 0.75 * height. For example, if the image size is 1024 * 1024 pixels, then the central rectangular area is a rectangular region bounded by a width of 256 to 768 pixels and a height of 256 to 768 pixels. The lower limit of the preset height ratio and the upper limit of the preset width ratio are 5% to 45%; the upper limit is 55% to 95%.

[0057] (2) Then, candidate fiber centers are extracted from the pixels that are not set as examined.

[0058] Step 1: Take the first pixel in the fiber bundle range on the positioning image that is not marked as examined as the examined pixel. Traverse the 8 neighboring pixels of the examined pixel. Set the traversed neighboring pixels as examined. If the gray value of the pixels in its neighbor range is greater than that of the examined pixel, then the pixel is set as the next examined pixel. Otherwise, the examined pixel is listed as the candidate fiber center.

[0059] Step 2: Select the pixels within the fiber bundle that are not marked for inspection as inspection pixels, and repeat the above process until all pixels within the fiber bundle are marked as inspected.

[0060] After the above steps 1 and 2, a candidate fiber center queue is formed.

[0061] (3) Finally, in the candidate fiber center queue, the fiber centers are selected to complete the extraction of fiber centers from the positioning image.

[0062] The candidate fiber center is compared with the set cutoff threshold. If it is higher than the cutoff threshold, it is considered to be the fiber center.

[0063] Cutoff threshold setting method: Set the cutoff threshold (30% of the average gray value) based on the average gray value of the central rectangular area within the fiber bundle range of the positioning image.

[0064] This implementation method can accurately and effectively extract the center of the optical fiber, resulting in more accurate image correction and better final image quality.

[0065] Figure 2 This is a schematic diagram of a pixel coordinate extraction device for the center of an optical fiber according to an embodiment of this application, as shown below. Figure 2As shown in the figure, this application embodiment also provides a pixel coordinate extraction device for the center of an optical fiber. It should be noted that the pixel coordinate extraction device for the center of an optical fiber in this application embodiment can be used to execute the pixel coordinate extraction method for the center of an optical fiber provided in this application embodiment. The pixel coordinate extraction device for the center of an optical fiber provided in this application embodiment is described below. The device includes: a receiving module 21, a first selection module 22, a searching module 23, and a second selection module 24, as detailed below.

[0066] A receiving module 21 is used to receive a target signal transmitted via optical fiber, wherein the target signal is a signal of a target image transmitted via optical fiber; a first selection module 22, connected to the receiving module 21, is used to select pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate fiber centers based on the target image converted from the target signal; a searching module 23, connected to the first selection module 22, is used to traverse the candidate fiber centers through a preset range window to find candidate fiber centers that meet the pixel value requirements and form a candidate fiber center queue; a second selection module 24, connected to the searching module 23, is used to select pixels whose pixel values ​​exceed a second pixel threshold as fiber centers from the candidate fiber center queue, and use the pixel coordinates of the pixels as the pixel coordinates of the fiber centers, wherein the second pixel threshold is higher than the first pixel threshold.

[0067] The aforementioned fiber optic center pixel coordinate extraction device, after receiving the target signal transmitted through the optical fiber (the target image signal), selects pixels with pixel values ​​exceeding a first pixel threshold as candidate fiber optic centers based on the target image converted from the target signal. It then iterates through the candidate fiber optic centers within a preset range window to find those meeting the pixel value requirements, forming a candidate fiber optic center queue. From this queue, pixels with pixel values ​​exceeding a second pixel threshold are selected as fiber optic centers, and their pixel coordinates are used as the pixel coordinates of the fiber optic center. The second pixel threshold is higher than the first pixel threshold. This achieves accurate positioning of the fiber optic center's pixel coordinates, improving the accuracy of pixel coordinate extraction. Furthermore, it solves the problem in related technologies where there is no effective means to accurately locate the pixel coordinates of the fiber optic center, often requiring manual marking, resulting in low efficiency and poor accuracy.

[0068] The pixel coordinate extraction device at the center of the optical fiber includes a processor and a memory. The receiving module 21, the first selection module 22, the search module 23, the second selection module 24, etc., are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.

[0069] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting the kernel parameters, the problem of users being unable to determine compatibility with non-capacitive screen original capacitive pens in related technologies can be solved.

[0070] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0071] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements a method for extracting the pixel coordinates of the center of an optical fiber.

[0072] This invention provides a processor for running a program, wherein the program executes a method for extracting the pixel coordinates of the optical fiber center.

[0073] Figure 3 This is a schematic diagram of an electronic device provided according to an embodiment of this application, such as... Figure 3 As shown, this application embodiment provides an electronic device 30, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the above-described method for extracting the pixel coordinates of the optical fiber center.

[0074] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0075] This application also provides a computer program product that, when executed on a pixel coordinate extraction device at the center of an optical fiber, is suitable for executing a program that initializes any of the above-described method steps.

[0076] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0077] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable fiber optic center pixel coordinate extraction device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable fiber optic center pixel coordinate extraction device, generate instructions for implementing the process... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0078] These computer program instructions may also be stored in a computer-readable storage medium that can guide a computer or other programmable fiber optic center pixel coordinate extraction device to operate in a specific manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0079] These computer program instructions can also be loaded onto a computer or other programmable fiber optic center pixel coordinate extraction device, causing a series of operational steps to be executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0080] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0081] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0082] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0083] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0084] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for extracting pixel coordinates of the center of an optical fiber, characterized in that, The method includes: Receive the target signal transmitted through optical fiber, wherein the target signal is the signal of the target image transmitted through optical fiber; Based on the target image converted from the target signal, pixels in the target image whose pixel values ​​exceed the first pixel threshold are selected as candidate fiber centers; The candidate fiber centers are traversed through a preset range window to find candidate fiber centers that meet the pixel value requirements and form a candidate fiber center queue. The preset range window is a square neighborhood range centered on the traversed pixel. The pixel value requirements include making the traversed pixel the pixel with the highest pixel value within the square neighborhood range. From the candidate fiber center queue, a pixel whose pixel value exceeds the second pixel threshold is selected as the fiber center, and the pixel coordinates of the pixel are used as the pixel coordinates of the fiber center, wherein the second pixel threshold is higher than the first pixel threshold.

2. The method according to claim 1, characterized in that, Based on the target image converted from the target signal, selecting pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate fiber centers includes: Based on the target image converted from the target signal, a central region of the target image is determined, wherein the central region is a rectangular region centered on the center of the target image and with a size that is a preset proportion of the size of the target image; The first pixel threshold is determined based on the pixel values ​​of all pixels in the intermediate region, wherein the first pixel threshold is a first preset ratio of the average pixel values ​​of all pixels in the intermediate region. The pixels in the target image are traversed, and pixels whose pixel values ​​exceed the first pixel threshold are selected as candidate fiber centers.

3. The method according to claim 2, characterized in that, The candidate fiber centers are traversed through a preset range window to find those that meet the pixel value requirements, forming a queue of candidate fiber centers including: Select the unmarked candidate fiber centers from the candidate fiber centers; Determine the pixel value of the pixel at the center position of the candidate optical fiber and multiple surrounding pixels within the preset range window; Based on the pixel values ​​of each pixel within the preset range window, determine whether the candidate fiber center meets the pixel value requirements, and mark the candidate fiber center. If there are still unmarked candidate fiber centers among the candidate fiber centers, continue to select unmarked candidate fiber centers to determine whether they meet the pixel value requirements, until all candidate fiber centers have been marked.

4. The method according to claim 3, characterized in that, Selecting pixels with pixel values ​​exceeding the second pixel threshold as fiber centers from the candidate fiber center queue includes: The second pixel threshold is determined based on the pixel values ​​of all pixels in the intermediate region, wherein the second pixel threshold is a second preset ratio of the average pixel value of all pixels in the intermediate region; The candidate fiber centers in the candidate fiber center queue are traversed, and the candidate fiber centers whose pixel values ​​exceed the second pixel threshold are selected as fiber centers.

5. The method according to claim 4, characterized in that, The size of the intermediate region is half the size of the target image.

6. The method according to claim 4, characterized in that, The first preset ratio is 3%-5%, and the second preset ratio is 10%-30%.

7. A device for extracting pixel coordinates at the center of an optical fiber, characterized in that, include: A receiving module is used to receive a target signal transmitted via optical fiber, wherein the target signal is a signal of a target image transmitted via optical fiber; The first selection module is used to select, based on the target image converted from the target signal, pixels in the target image whose pixel values ​​exceed a first pixel threshold as candidate fiber centers; The search module is used to traverse the candidate fiber centers through a preset range window, find the candidate fiber centers that meet the pixel value requirements, and form a candidate fiber center queue; the preset range window is a square neighborhood range centered on the traversed pixel, and the pixel value requirements include making the traversed pixel the pixel with the highest pixel value within the square neighborhood range. The second selection module is used to select pixels whose pixel values ​​exceed a second pixel threshold from the candidate fiber center queue as fiber centers, and to use the pixel coordinates of the pixel points as the pixel coordinates of the fiber centers, wherein the second pixel threshold is higher than the first pixel threshold.

8. A computer-readable storage medium, characterized in that, The storage medium is used to store a program, wherein the program executes the pixel coordinate extraction method for the center of the optical fiber as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the pixel coordinate extraction method for the center of an optical fiber as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Optical Fiber bundle image analysis method and device

    CN107622491A

  • Edge extraction-based light spot identification method and system

    CN115131576A