A control method and device for a gastroscopic capsule
Patent Information
- Application Number
- CN202410247888.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-29
- Filing Date
- 2024-03-05
- Publication Date
- 2026-10-27
AI Technical Summary
相关技术中的胃镜胶囊,由于在胃部液体中运动时,需要医护人员控制胃镜胶囊在胃中沿固定路径进行图像扫描,寻找病灶的时长较长
[0048]本发明实施例包括以下优点:首先,基于所述胃镜胶囊获取多段视频,其中,多段视频的长度相同,然后,将多段所述视频进行二维展开,得到多个帧画面,基于所述帧画面确定初级特征点图像,其中,所述初级特征点图像为胃壁上的初级特征点的图像,然后,确定具有所述初级特征点图像的所述帧画面为目标帧画面,然后,切分所述目标帧画面以形成多个第一子图像,并确定具有所述初级特征点的所述第一子图像为初始第一子图像,最后,获取多个所述初始第一子图像,融合多个所述初始第一子图像以获得目标第一子图像并显示。本发明提出的方法,在胃镜胶囊吞服后即可自动开始获取视频,由于胃部液体的晃动,胶囊通过在一段时间内获取的多段视频,可以利用多段视频确定胃壁上的初级特征点,即病灶的位置,并将该位置显示出来,简化了胃镜过程中,寻找病灶的过程。
Smart Images

Figure CN122989504A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control technology, and in particular to a control method and device for a gastroscopy capsule. Background Technology
[0002] With increasing emphasis on health, gastroscopy has become an important means of detecting digestive system diseases. However, traditional gastroscopy requires a specialist doctor, demanding high levels of skill and often resulting in a painful procedure. A capsule endoscope transmits images from within the capsule to a signal transmitter, which then displays the images to the patient or doctor. In this technology, the capsule endoscope requires medical personnel to control its movement along a fixed path within the stomach to scan for lesions, resulting in a longer search time. Summary of the Invention
[0003] This invention provides a method and apparatus for controlling a gastroscopy capsule to improve the above-mentioned problems.
[0004] This invention provides a control method for a gastroscopy capsule, characterized in that it is applied to an electronic gastroscope, the electronic gastroscope including a gastroscopy capsule and a control terminal, and the gastroscopy capsule control method is applicable to the control terminal, including: acquiring multiple video segments based on the gastroscopy capsule, wherein the multiple video segments have the same length;
[0005] The multiple video segments are unfolded in two dimensions to obtain multiple frames. Based on the frames, a primary feature point image is determined, wherein the primary feature point image is an image of primary feature points on the stomach wall.
[0006] The frame containing the primary feature point image is identified as the target frame.
[0007] The target frame is segmented to form multiple first sub-images, and the first sub-image with the primary feature points is determined as the initial first sub-image;
[0008] Acquire multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
[0009] In conjunction with the first aspect, in some embodiments, after displaying the target first sub-image, the method further includes:
[0010] The endoscope capsule is controlled to acquire a secondary image, wherein the primary feature point image coincides with the center image of the secondary image.
[0011] In conjunction with the first aspect, in some embodiments, the multiple video segments are unfolded in two dimensions to obtain multiple frames. A primary feature point image is determined based on the frames, wherein the primary feature point image is an image of primary feature points on the stomach wall, including:
[0012] The frame is segmented to form multiple second sub-images;
[0013] Obtain the pixel arrangement in each of the second sub-images, and determine the second sub-images with the same arrangement order as the primary feature point images based on the approximation principle.
[0014] In conjunction with the first aspect, in some embodiments, acquiring multiple initial first sub-images, fusing the multiple initial first sub-images to obtain a target first sub-image, and displaying it includes:
[0015] Determine the secondary feature points in the initial first sub-image;
[0016] The initial first sub-image is divided into multiple third sub-images, and the third sub-image containing the secondary feature points is determined as the target third sub-image;
[0017] The target third sub-image, which has different secondary feature point images, is stitched together to form the target first sub-image.
[0018] In conjunction with the first aspect, in some embodiments, the target third sub-image, which has different secondary feature point images, is stitched together to form the target first sub-image, including:
[0019] Multiple target third sub-images are grouped together, wherein target third sub-images having the same secondary feature points are considered the same image group;
[0020] Multiple images are combined and stitched together to form the first sub-image of the target.
[0021] In conjunction with the first aspect, in some embodiments, combining and stitching together multiple images to form the target first sub-image includes:
[0022] Obtain the pixel arrangement of each of the target third sub-images, where each pixel has a unique score;
[0023] The score of the pixel combination of the target third sub-image is determined based on the weight of each pixel in the target third sub-image;
[0024] The average score of the image combination is determined based on the scores of the pixel combinations of all target third sub-images in the image combination;
[0025] The top pixel arrangement of the image combination is determined based on the average score;
[0026] The target third sub-image is stitched together according to the top-level pixel arrangement to form the target first sub-image.
[0027] Secondly, embodiments of the present invention provide a control device for a gastroscopy capsule, comprising:
[0028] A first acquisition module is used to acquire multiple video segments based on the endoscope capsule, wherein the multiple video segments have the same length.
[0029] The first determining module is used to perform two-dimensional unfolding of multiple video segments to obtain multiple frame images, and to determine primary feature point images based on the frame images, wherein the primary feature point images are images of primary feature points on the stomach wall.
[0030] The second determining module is used to determine the frame image having the primary feature point image as the target frame image;
[0031] The first segmentation module is used to segment the target frame to form multiple first sub-images, and to determine the first sub-image with the primary feature points as the initial first sub-image;
[0032] The second acquisition module is used to acquire multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
[0033] In conjunction with the second aspect, some feasible implementations also include:
[0034] A first control module is used to control the endoscope capsule to acquire secondary images, wherein the primary feature point image coincides with the center image of the secondary image.
[0035] In conjunction with the second aspect, some feasible implementations also include:
[0036] The second segmentation module is used to segment the frame to form multiple second sub-images;
[0037] The third acquisition module is used to acquire the pixel arrangement in each of the second sub-images, and to determine the second sub-images with the same arrangement order as the primary feature point images by means of the approximation principle.
[0038] In conjunction with the second aspect, some feasible implementations also include:
[0039] The third determining module is used to determine secondary feature points in the initial first sub-image;
[0040] The third segmentation module is used to segment the initial first sub-image into multiple third sub-images, and determine the third sub-image with the secondary feature points as the target third sub-image;
[0041] A first stitching module is used to stitch together the target third sub-image, which has different secondary feature point images, to form the target first sub-image.
[0042] In conjunction with the second aspect, some feasible implementations further include: grouping multiple target third sub-images, wherein target third sub-images having the same secondary feature points are the same image group;
[0043] The second stitching module is used to stitch together multiple images to form the target first sub-image.
[0044] A third aspect of this invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0045] Memory, used to store computer programs;
[0046] When a processor executes a program stored in memory, it implements the method steps proposed in the first aspect of the embodiments of the present invention.
[0047] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention.
[0048] The embodiments of this invention include the following advantages: First, multiple video segments are acquired based on the endoscope capsule, wherein the multiple video segments are of the same length. Then, the multiple video segments are unfolded in two dimensions to obtain multiple frames. Primary feature point images are determined based on the frames, wherein the primary feature point images are images of primary feature points on the stomach wall. Then, the frame containing the primary feature point images is determined as the target frame. Next, the target frame is segmented to form multiple first sub-images, and the first sub-image containing the primary feature points is determined as the initial first sub-image. Finally, multiple initial first sub-images are acquired, and the multiple initial first sub-images are merged to obtain the target first sub-image and displayed. The method proposed in this invention automatically begins acquiring video after the endoscope capsule is swallowed. Due to the movement of gastric fluid, the capsule, through multiple video segments acquired over a period of time, can use these multiple video segments to determine the location of primary feature points on the stomach wall, i.e., the lesion, and display this location, simplifying the process of locating lesions during endoscopy. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a schematic flowchart of a method for controlling a gastroscopy capsule proposed in an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] This application provides a method for controlling a gastroscopy capsule, applied to an electronic gastroscope. The electronic gastroscope includes a gastroscopy capsule and a control terminal. The gastroscopy capsule control method is applicable to the control terminal. Please refer to [link to relevant documentation]. Figure 1 The method includes the following steps:
[0053] S101: Obtain multiple video segments based on the gastroscopy capsule, wherein the multiple video segments have the same length.
[0054] Understandably, once the endoscopy capsule is swallowed, no further control is needed; simply activating the system will automatically begin acquiring video. By segmenting the acquired video, multiple video segments of equal length can be obtained.
[0055] S102: The multiple video segments are unfolded in two dimensions to obtain multiple frames. Based on the frames, a primary feature point image is determined, wherein the primary feature point image is an image of primary feature points on the stomach wall.
[0056] Understandably, the lens used to acquire video in the endoscope capsule is a spherical lens to capture a wider image angle. Due to the characteristics of a spherical lens, the image captured is shaped like a sphere in three-dimensional space. Directly cropping or stitching this spherical image places a heavy load on the operating system and computer hardware. Therefore, in this application, the video is unfolded in two dimensions. In this application, the primary feature point image is the image of the suspected lesion or lesion itself, characterized by a color and gloss that are significantly different from the surrounding tissue. Therefore, as the endoscope capsule moves freely in the stomach, these primary feature points will appear multiple times in the lens.
[0057] Specifically, as one implementation method, step S102 may include the following steps:
[0058] S102-1: Segment the frame to form multiple second sub-images.
[0059] S102-2: Obtain the pixel arrangement in each of the second sub-images, and determine the second sub-images with the same arrangement order as the primary feature point images by approximation principle.
[0060] In this embodiment, the second sub-image has a certain pixel arrangement. Therefore, in this application, the same primary feature point image is determined by whether the pixel arrangement order is the same.
[0061] S103: Determine the frame image with the primary feature point image as the target frame image.
[0062] Understandably, in a video segment, the frame segment with primary feature point images is the target frame.
[0063] S104: Segment the target frame to form multiple first sub-images, and determine the first sub-image with the primary feature points as the initial first sub-image.
[0064] Understandably, in this step, the target frame is divided into multiple first sub-images using a segmentation method, and the first sub-image is determined to contain the primary feature points identified in the above steps. If they do, they are identified as the initial first sub-image.
[0065] S105: Obtain multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
[0066] Understandably, fusing the initial first sub-images acquired during shooting can yield a more accurate initial first sub-image, avoiding image distortion caused by issues such as image shake. Specifically, as one implementation method, step S105 may further include the following steps:
[0067] S105-1: Determine the secondary feature points in the initial first sub-image.
[0068] Understandably, secondary feature points are points in the initial first sub-image. Since the initial first sub-image includes primary feature points, secondary feature points are more refined feature points than primary feature points and are located on primary feature points.
[0069] S105-2: Divide the initial first sub-image into multiple third sub-images, and determine the third sub-image with the secondary feature point as the target third sub-image.
[0070] Understandably, by further segmenting the initial first sub-image, a target third sub-image with secondary feature points can be extracted.
[0071] S105-3: The target third sub-image with different secondary feature point images is stitched together to form the target first sub-image.
[0072] Understandably, the first sub-image of the target, formed by stitching together all the third sub-images of the target with secondary feature points, avoids the impact of unclear images.
[0073] Specifically, as one implementation method, step S105-3 may include the following steps:
[0074] S105-3-1: Group the multiple target third sub-images, wherein the target third sub-images having the same secondary feature points are the same image group;
[0075] S105-3-2: Combine and stitch together multiple images to form the first sub-image of the target.
[0076] Understandably, by grouping the target third sub-images, it is possible to avoid blurring the third sub-images due to shaking or other factors.
[0077] Specifically, as one implementation method, the splicing can be carried out in the following ways:
[0078] S105-3-2-1: Obtain the pixel arrangement of each of the target third sub-images, where each pixel has a unique score.
[0079] Specifically, first, the images of all targets are segmented into sub-images. Image segmentation can be achieved using functions from image processing libraries (such as OpenCV). Each target image is segmented into three sub-images, and these are stored in a list. For the third sub-image of each target, it is converted into a pixel permutation. The image can be converted into a pixel matrix using functions from an image processing library, and a unique score can be assigned to each pixel. A variable can be used to represent the score, and its value is incremented each time a score is assigned. The permutation and score of each pixel are stored in a dictionary, with the pixel permutation as the key and the score as the value.
[0080] S105-3-2-2: Determine the score of the pixel combination of the target third sub-image based on the weight of each pixel of the target third sub-image.
[0081] Specifically, each pixel in the target third sub-image is iterated over to obtain its pixel value and corresponding weight. The weight of each pixel is multiplied by its pixel value to obtain a weighted value. The weighted values of all pixels are summed to obtain the final score.
[0082] S105-3-2-3: Determine the average score of the image combination based on the scores of the pixel combinations of all target third sub-images in the image combination.
[0083] Understandably, dividing the total score by the number of target third sub-images yields the average score of the image combination.
[0084] S105-3-2-4: Determine the top pixel arrangement of the image combination based on the average score.
[0085] Understandably, the pixel combinations could be sorted in descending order based on their ratings, starting with the highest-rated combination and gradually moving downwards. This way, the top-level pixel arrangement would consist of higher-rated pixel combinations, while lower-rated combinations would be placed later in the arrangement.
[0086] S105-3-2-5: The target third sub-image is stitched together according to the top-level pixel arrangement to form the target first sub-image.
[0087] Understandably, this method of stitching together allows for the restoration of the image as accurately as possible.
[0088] As one implementation method, the process of stitching the target third sub-image according to the top-level pixel arrangement can be carried out using the following steps:
[0089] Obtain the target arrangement in the top-level pixels, wherein the target arrangement is the edge arrangement of the top-level pixels;
[0090] Regions having the same edge arrangement are overlapped;
[0091] The first sub-image of the target is determined based on the overlapping third sub-image of the target.
[0092] By following the steps above, a relatively accurate initial first sub-image can be obtained.
[0093] Due to limitations in data transmission speed, the video clarity is poor. Therefore, after acquiring the initial first sub-image via video, the control end of the gastroscopy can directly display it, allowing medical personnel to identify feature points. If a lesion is confirmed, the high-definition lens of the gastroscopy capsule can be controlled to capture it. Therefore, as one implementation method, the method further includes:
[0094] S106: Control the endoscope capsule to acquire a secondary image, wherein the primary feature point image coincides with the center image of the secondary image.
[0095] The gastroscopy capsule control method proposed in this invention acquires multiple video segments of equal length using the gastroscopy capsule. These video segments are then unfolded in two dimensions to obtain multiple frames. Primary feature point images are determined based on these frames, where the primary feature point images are images of primary feature points on the stomach wall. The frame containing the primary feature point images is then identified as the target frame. The target frame is then segmented to form multiple first sub-images, and the first sub-image containing the primary feature points is identified as the initial first sub-image. Finally, the multiple initial first sub-images are acquired, merged, and displayed to obtain the target first sub-image. This method automatically begins acquiring video after the gastroscopy capsule is swallowed. Due to the movement of gastric fluid, the capsule, through acquiring multiple video segments over a period of time, can determine the location of primary feature points on the stomach wall, i.e., lesions, and display these locations, simplifying the process of locating lesions during gastroscopy.
[0096] Based on the same inventive concept, this application also proposes a gastroscopy capsule control device, comprising:
[0097] A first acquisition module is used to acquire multiple video segments based on the endoscope capsule, wherein the multiple video segments have the same length.
[0098] The first determining module is used to perform two-dimensional unfolding of multiple video segments to obtain multiple frame images, and to determine primary feature point images based on the frame images, wherein the primary feature point images are images of primary feature points on the stomach wall.
[0099] The second determining module is used to determine the frame image having the primary feature point image as the target frame image;
[0100] The first segmentation module is used to segment the target frame to form multiple first sub-images, and to determine the first sub-image with the primary feature points as the initial first sub-image;
[0101] The second acquisition module is used to acquire multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
[0102] In some feasible implementations, it also includes:
[0103] A first control module is used to control the endoscope capsule to acquire secondary images, wherein the primary feature point image coincides with the center image of the secondary image.
[0104] In some feasible implementations, it also includes:
[0105] The second segmentation module is used to segment the frame to form multiple second sub-images;
[0106] The third acquisition module is used to acquire the pixel arrangement in each of the second sub-images, and to determine the second sub-images with the same arrangement order as the primary feature point images by means of the approximation principle.
[0107] In some feasible implementations, it also includes:
[0108] The third determining module is used to determine secondary feature points in the initial first sub-image;
[0109] The third segmentation module is used to segment the initial first sub-image into multiple third sub-images, and determine the third sub-image with the secondary feature points as the target third sub-image;
[0110] A first stitching module is used to stitch together the target third sub-image, which has different secondary feature point images, to form the target first sub-image.
[0111] In conjunction with the second aspect, some feasible implementations further include: grouping multiple target third sub-images, wherein target third sub-images having the same secondary feature points are the same image group;
[0112] The second stitching module is used to stitch together multiple images to form the target first sub-image.
[0113] The gastroscopy capsule control device proposed in this invention acquires multiple video segments of equal length using the gastroscopy capsule. These video segments are then unfolded in two dimensions to obtain multiple frames. Primary feature point images are determined based on these frames, where the primary feature point images are images of primary feature points on the stomach wall. The frame containing the primary feature point images is then identified as the target frame. The target frame is then segmented to form multiple first sub-images, and the first sub-image containing the primary feature points is identified as the initial first sub-image. Finally, the multiple initial first sub-images are acquired, merged, and displayed to obtain the target first sub-image. This gastroscopy capsule control device automatically begins acquiring video after the gastroscopy capsule is swallowed. Due to the movement of gastric fluid, the capsule, through acquiring multiple video segments over a period of time, can determine the location of primary feature points on the stomach wall, i.e., lesions, and display these locations, simplifying the process of locating lesions during gastroscopy.
[0114] Based on the same inventive concept, embodiments of this application also propose an electronic device, which includes:
[0115] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the automatic overheat protection method based on the universal testing machine according to the embodiments of this application.
[0116] In addition, to achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the automatic overheat protection method based on a universal testing machine according to embodiments of this application.
[0117] The following is a detailed introduction to the various components of the electronic device:
[0118] In this context, the processor is the control center of the electronic device. It can be a single processor or a collective term for multiple processing elements. For example, a processor can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0119] Alternatively, the processor can perform various functions of the electronic device by running or executing software programs stored in memory and by calling data stored in memory.
[0120] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0121] Optionally, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory can be integrated with the processor or exist independently and coupled to the processor through an interface circuit of an electronic device; this embodiment of the invention does not specifically limit this.
[0122] A transceiver is used to communicate with network devices or with terminal devices.
[0123] Optionally, the transceiver may include a receiver and a transmitter. The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
[0124] Optionally, the transceiver can be integrated with the processor or exist independently and coupled to the processor through the router's interface circuit. This embodiment of the invention does not specifically limit this.
[0125] Furthermore, the technical effects of the electronic device can be referred to the technical effects of the data transmission method described in the above method embodiments, and will not be repeated here.
[0126] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0127] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0128] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0129] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0130] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0131] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0132] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0133] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0134] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0136] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0137] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0138] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for controlling a gastroscopy capsule, characterized in that, An electronic gastroscope is applied to an electronic gastroscope, the electronic gastroscope comprising a gastroscope capsule and a control terminal, wherein the gastroscope capsule control method is applicable to the control terminal, comprising: Multiple video segments are acquired based on the gastroscopy capsule, wherein the multiple video segments are of the same length; The multiple video segments are unfolded in two dimensions to obtain multiple frames. Based on the frames, a primary feature point image is determined, wherein the primary feature point image is an image of primary feature points on the stomach wall. The frame containing the primary feature point image is identified as the target frame. The target frame is segmented to form multiple first sub-images, and the first sub-image with the primary feature points is determined as the initial first sub-image; Acquire multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
2. The method for controlling a gastroscopy capsule according to claim 1, characterized in that, After displaying the first sub-image of the target, the method further includes: The endoscope capsule is controlled to acquire a secondary image, wherein the primary feature point image coincides with the center image of the secondary image.
3. The method for controlling a gastroscopy capsule according to claim 2, characterized in that, The multiple video segments are unfolded in two dimensions to obtain multiple frames. Primary feature point images are determined based on these frames. These primary feature point images are images of primary feature points on the stomach wall, including: The frame is segmented to form multiple second sub-images; Obtain the pixel arrangement in each of the second sub-images, and determine the second sub-images with the same arrangement order as the primary feature point images based on the approximation principle.
4. The method for controlling a gastroscopy capsule according to claim 3, characterized in that, The step of acquiring multiple initial first sub-images, fusing the multiple initial first sub-images to obtain a target first sub-image, and displaying it includes: Determine the secondary feature points in the initial first sub-image; The initial first sub-image is divided into multiple third sub-images, and the third sub-image containing the secondary feature points is determined as the target third sub-image; The target third sub-image, which has different secondary feature point images, is stitched together to form the target first sub-image.
5. The method for controlling a gastroscopy capsule according to claim 4, characterized in that, The target third sub-image, composed of images with different secondary feature points, is stitched together to form the target first sub-image, including: Multiple target third sub-images are grouped together, wherein target third sub-images having the same secondary feature points are considered the same image group; Multiple images are combined and stitched together to form the first sub-image of the target.
6. The method for controlling a gastroscopy capsule according to claim 5, characterized in that, The step of combining and stitching together multiple images to form the target first sub-image includes: Obtain the pixel arrangement of each of the target third sub-images, where each pixel has a unique score; The score of the pixel combination of the target third sub-image is determined based on the weight of each pixel in the target third sub-image; The average score of the image combination is determined based on the scores of the pixel combinations of all target third sub-images in the image combination; The top pixel arrangement of the image combination is determined based on the average score; The target third sub-image is stitched together according to the top-level pixel arrangement to form the target first sub-image.
7. The method for controlling a gastroscopy capsule according to claim 6, characterized in that, The step of stitching the target third sub-image according to the top-level pixel arrangement to form the target first sub-image includes: Obtain the target arrangement in the top-level pixels, wherein the target arrangement is the edge arrangement of the top-level pixels; Regions having the same edge arrangement are overlapped; The first sub-image of the target is determined based on the overlapping third sub-image of the target.
8. A capsule endoscopy control device, characterized in that, include: A first acquisition module is used to acquire multiple video segments based on the endoscope capsule, wherein the multiple video segments have the same length. The first determining module is used to perform two-dimensional unfolding of the multiple video segments to obtain multiple frames, and to determine a primary feature point image based on the frames, wherein the primary feature point image is an image of primary feature points on the stomach wall. The second determining module is used to determine the frame image having the primary feature point image as the target frame image; The first segmentation module is used to segment the target frame to form multiple first sub-images, and to determine the first sub-image with the primary feature points as the initial first sub-image; The second acquisition module is used to acquire multiple initial first sub-images, fuse the multiple initial first sub-images to obtain a target first sub-image, and display it.
9. An electronic device, characterized in that, include: A processor, wherein the processor, when executing a program stored in memory, implements the method as claimed in any one of claims 1 to 7; It also includes a communication interface, a memory, and a communication bus, wherein the communication interface and the memory communicate with each other through the communication bus, and the computer program is stored thereon.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as claimed in any one of claims 1 to 7.