| As an effective method for the diagnosis and treatment of diseases,endoscopes can help doctors accurately find the lesions and perform surgical treatment,which has high clinical application value.With the advent of the 4K,applying 4K technology to endoscopes can make images sharper and more colorful,and make treatment more accurate and effective.However,4K images have 4 times the data volume of 1080P,and real-time display and image processing of 4K videos are especially challenging.The paper has developed a set of Ultra HD endoscope software system based on the Core-i7 eighth generation processor and Quadro P1000 GPU,which achieves the real-time capture,decoding,process and display of 3840*2160 resolution images at 30fps.The paper first captures 4K endoscope video data based on the DirectShow streaming media framework,and decodes the captured MJPEG compressed data in real-time by a heterogeneous platform of CPU/GPU,and finally sends the RGBA data of the video memory to the texture memory of OpenGL for rendering and display,Image capture,JPEG decoding,image processing and display framework are fully optimized to minimize its delay.Secondly,in order to achieve 4K real-time image processing,the paper conducted optimization experiments on the CUDA programming framework based on Sobel operators to design and verify CUDA’s optimization strategies for parallel programming.The contour enhancement algorithm is optimized and accelerated by the methods of thread configuration,memory access mode,and streamlined operation.Finally,the paper designs a video denoising algorithm,which greatly reduces random noise while still maintaining video display at 30fps,and proposes a method for evaluating the quality of non-reference images.This method is used to evaluate ten consecutive frames before and after freezing,and select the best quality for frozen display.The experiment results show that the 4K endoscope software system developed in this paper has high performance and low latency,and reached the expected practical application goals. |