Medical endoscope is a commonly used clinical diagnostic tool. Doctors can directly observe the internal organs of the human body through the endoscope, such as ulcers, tumors, etc., and can also use it for minimally invasive surgery in the medical community. Wide range of applications.
The electronic endoscope is mainly composed of an optical lens, an information acquisition system, a monitor, and the like. The imaging principle of the electronic endoscope is: the light signal emitted by the light source of the information acquisition system is guided by the light guiding fiber in the lens to the human body cavity, and after being reflected by the inner surface of the body cavity, is received by the miniature image sensor CCD equipped with the front end of the lens body. The CCD converts the optical signal into an electrical signal and then transmits it to the information acquisition system through the wire. The information acquisition system processes the image signal and displays it on the monitor screen.
The medical endoscope imaging system developed by this project can be used with a variety of types of digestive system endoscopes, and can be flexibly switched between the gastroscope and the colonoscope.
1 System design and implementation The hardware components of the system include: digestive system endoscope (gastroscopy / colonoscopy), monitor, CCD, endoscopic imaging system, video capture card, color printer, foot switch, hardware structure 1 is shown.
This article refers to the address: http://
The functions of the medical endoscope imaging system are roughly: real-time image display and acquisition, digital image preprocessing, case information management, maintenance of typical case bases, generation and maintenance of diagnostic reports, and the like. Its specific implementation is as follows:
(1) Real-time display of images.
The image data of the endoscope system comes from the CCD on the lens. The CCD converts the optical signal obtained by the lens into an electrical signal and transmits it to the video capture card through the wire. The video capture card converts the electrical signal into a digital signal that can be understood by the computer, facilitating the image. Real-time display and acquisition.
The video capture card used in this system is SDK3000 produced by Tianmin Company. The PCI card is a single card with one SAA7130 chip, which can transmit 4 channels of Video and 1 channel of SVideo real-time video signals. Single-machine multi-card operation can be achieved with machine performance permitting. The SDK3000 supports multi-standard video sources (PAL, NTFS, SECAM).
Using a frame rate of one card output, the frame rate of the 50 Hz output of the video source is up to 25 frames, and the frame rate of the 60 Hz output of the video source is up to 30 frames.
(2) Image acquisition. Image acquisition includes the acquisition of single-frame digital images and the recording of video.
There are two ways to capture single-frame images: one is that the operator uses the mouse to collect near the computer; the other is that the operator uses the footswitch to collect. The foot switch is connected to the serial port of the computer. Each time the foot switch is triggered, the serial port of the computer will receive a string of hexadecimal strings, and then perform the function of single-frame image acquisition.
The image data obtained from the video capture card is in yuv format, and most of the image processing is based on the RGB color space, so the color space is converted.
In addition to supporting full-screen capture, you can also manually set the capture area. The user can select a rectangular area as the effective area by using the mouse circle, and the image outside the effective area is discarded. The implementation method is to calculate the effective size of the image according to the rectangular area selected by the user and the original size of the image, intercept the valid data, perform Yuvtorgb conversion, and combine the converted data plus the file header and the information header into a valid image.
Recorded video can be used for scientific research on the one hand. On the other hand, it can help doctors to collect missing lesion images. The video is generally XviD MPEG-4 encoded with a frame rate of 25.
(3) Video playback and 2 acquisitions.
There are many ways to play video. This system uses the registered Windows Media Player component in VC to support video playback, pause, fast forward and so on.
2 acquisitions refers to the collection of lesion images that may be missed from the video stream. Since the video is compressed based on the XviD MPEG-4 encoding method, obtaining a single frame image requires decoding. The xvid decoder can be called automatically using the avi API function.
PGETFRAME pGF=AVIStreamGetFrameOpen(pAStream, NULL);
This way the data in the original xvid format is obtained, which does not match the expectations.
The specific steps to get the RGB format data are:
Step1 obtains the format size;
Step 2 obtains a format information header;
Step 3 modify the compression mode and buffer size of the information header;
Step 4 passes the modified information header to the second parameter of the above formula, and the returned value is the RGB format data.
(4) Medical record management.
In actual use, multiple people may be registered at the same time, the operator can enter the basic information of multiple patients into the system, and then arrange endoscopy in order. Therefore, the system provides four medical record navigation keys, “firstâ€, “previousâ€, “next†and “final†for medical staff to view.
In addition, the system provides a variety of ways to view historical medical records. For example, the medical record can be queried by keyword such as name, check number, etc., and the fuzzy query can be performed by the diagnostic name to count the query result.
(5) Image preprocessing.
Single-frame image preprocessing uses a graphics library, CxImage, as shown in Figure 2. Compared with other excellent graphics libraries such as OpenIL, FreeImage, and PaintLib, CxImge not only has powerful and complete functions, but also is completely open source. For digital image processing, not only can it be used flexibly to complete the development of Shaanxi, but it can learn its internal core implementation code.
The CxImage library not only allows flexible conversion between image formats, but also basic preprocessing of images such as brightness, chrominance, saturation adjustment, image scaling and rotation.
(6) Report generation and maintenance.
- A detailed diagnostic report consists of the patient's basic textual information, image information and diagnostic results. The basic text information includes: patient name, address, telephone number, occupation, attending doctor, chief complaint, preoperative preparation, etc. This type of information needs to be manually entered by medical personnel. The image information refers to the lesion image or video. Due to the limited database capacity, the doctor selects 16 of the collected images from the database, and 4 of them will be printed on the diagnostic report. Diagnostic results include a description of the health status of various parts of the patient's digestive system, as well as diagnostic results. This information can be entered manually or appropriately modified on appropriate typical cases. If the doctor extracts a biopsy sample from the patient, it is also necessary to record the part name and number of blocks of the biopsy sample. Once the diagnostic report is generated, it can be previewed and printed.
(7) Maintenance of a typical case base.
Experienced doctors can summarize common medical record descriptions in a large number of endoscopic medical records. The system provides a typical medical record database. The user selects a suitable typical case. After a small number of modifications, a medical record report can be generated, and a preview function can be provided while modifying, which not only reduces the workload of manual entry by medical personnel, "what you see is what you see. The resulting method is also more intuitive and efficient, as shown in Figure 4. Users can also add, delete, and modify the contents of a typical case base according to their own experience.
Database design: The most important data table in this system is the medical record report form. Take the StomachReport table as an example. The main fields are shown in Table 1.
2 System Testing The medical endoscopy-assisted diagnostic system is the center for the acquisition, processing, storage and transmission of endoscopic image information. Its functional completeness, stability, safety and ease of operation play an important role in the clinical use of endoscopes.
3 Conclusion paper medical endoscopic imaging system with the introduction of major digestive stomach / intestine using an endoscope, endoscopy assistant physician, compatible with a variety of lenses, and in order to improve the diagnostic efficiency as a starting point, provides the user with typical Case library and other auxiliary functions that facilitate report generation.
Fork Type Terminals,Insulated Bullet Sockets Terminals,Insulated Bullet Terminals,Type Fork Insulate Terminal
Taixing Longyi Terminals Co.,Ltd. , https://www.longyicopperterminals.com