CN117478803A - Method for correcting image of endoscope device, and storage medium - Google Patents

Method for correcting image of endoscope device, and storage medium Download PDF

Info

Publication number
CN117478803A
CN117478803A CN202311813873.XA CN202311813873A CN117478803A CN 117478803 A CN117478803 A CN 117478803A CN 202311813873 A CN202311813873 A CN 202311813873A CN 117478803 A CN117478803 A CN 117478803A
Authority
CN
China
Prior art keywords
image
original
rotation
coordinate
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311813873.XA
Other languages
Chinese (zh)
Other versions
CN117478803B (en
Inventor
钟育
龚成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Hongxin Technology Co ltd
Original Assignee
Zhuhai Hongxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Hongxin Technology Co ltd filed Critical Zhuhai Hongxin Technology Co ltd
Priority to CN202311813873.XA priority Critical patent/CN117478803B/en
Publication of CN117478803A publication Critical patent/CN117478803A/en
Application granted granted Critical
Publication of CN117478803B publication Critical patent/CN117478803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/64Systems for the transmission or the storage of the colour picture signal; Details therefor, e.g. coding or decoding means therefor
    • H04N1/648Transmitting or storing the primary (additive or subtractive) colour signals; Compression thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00127Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
    • H04N1/00129Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a display device, e.g. CRT or LCD monitor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00127Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
    • H04N1/00249Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a photographic apparatus, e.g. a photographic printer or a projector
    • H04N1/00251Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a photographic apparatus, e.g. a photographic printer or a projector with an apparatus for taking photographic images, e.g. a camera
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3872Repositioning or masking
    • H04N1/3873Repositioning or masking defined only by a limited number of coordinate points or parameters, e.g. corners, centre; for trimming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3877Image rotation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a correction method of an image of an endoscope device, the endoscope device and a storage medium, wherein the method comprises setting a plurality of vertex angle coordinates of a plurality of predicted small block images of a predicted rotation image; acquiring a rotation angle and an original image, and calculating the original coordinates of the original image corresponding to each vertex angle coordinate according to a rotation formula; confirming a pre-reading range of an original image according to each original coordinate corresponding to each vertex angle coordinate, and reading pixel values corresponding to each original coordinate of an area image according to the pre-reading range and the original coordinate corresponding to each vertex angle coordinate, wherein each area image corresponds to one prediction small image; the processor converts each area image into each small image corresponding to the rotating image, compresses a plurality of small images to form a compressed code stream, and sends the compressed code stream to the display terminal; and the display terminal decompresses the compressed code stream to obtain a rotation image. The invention reduces the processing capacity of the processor, reduces the transmitted data quantity and increases the transmission distance of the endoscope image.

Description

Method for correcting image of endoscope device, and storage medium
Technical Field
The present invention relates to the technical field of endoscopes, and more particularly, to a method for correcting an image of an endoscope apparatus, an endoscope apparatus for implementing the method, and a computer-readable storage medium.
Background
In order to keep the frame displayed by the display terminal always forward, the conventional endoscope is commonly used for collecting an original image and a rotation angle and uploading the original image and the rotation angle to the display terminal, and the display terminal uniformly adopts an image processing algorithm to correct the original image. The method needs to transmit the original image and the rotation angle simultaneously, the data volume to be transmitted is extremely large, and transmission errors are easy to occur. And the rotation angle data is required to be synchronously processed with the original image, and the display terminal is required to process a large amount of data, so that the requirement of the data processing capability of the display terminal is improved, the endoscope can only be bound with a specific display terminal and cannot be bound with a common display terminal, and the compatibility of the endoscope and the display terminal is low.
The existing rotation method for the endoscope collected images is to collect rotation angles through a gyroscope, collect images according to the rotation angles to be rotated, convert the collected images according to the rotation angles and display the collected images after rotation on a display screen. According to the scheme, after the acquired image is converted, the acquired image is sent to the display screen for display, however, the rotated acquired image is directly sent to the display screen, the transmitted data size is large, the transmission distance is limited, and transmission errors are easy to occur.
In addition, when the method is executed, when the data of the pixel points of the acquired image are copied to the corresponding solid-color pixels in the rotating image cache space, the pixel points need to be read in the acquired image in the memory, when the pixel points are repeatedly read in the acquired image, each pixel point need to be read for traversing the whole acquired image, and the data processing capacity of the processor is large.
Disclosure of Invention
It is a first object of the present invention to provide a method of correcting an image of an endoscopic device that saves bandwidth and reduces the data throughput of a processor.
A second object of the present invention is to provide an endoscope apparatus that realizes the method for correcting an image of the endoscope apparatus.
A third object of the present invention is to provide a storage medium to which the method for correcting an image of an endoscope apparatus described above is applied.
In order to achieve the first object, the present invention provides a method for correcting an image of an endoscope apparatus, comprising: setting a plurality of predicted small block images of the predicted rotating image according to a compression rule, and obtaining vertex angle coordinates of each predicted small block image; acquiring a rotation angle output by an angle sensor, acquiring an original image, and calculating original coordinates of the original image corresponding to each vertex angle coordinate according to a rotation formula; determining each pre-reading range of the original image according to each original coordinate, wherein the pre-reading range of the original image is a part of the original image; reading pixel values corresponding to original coordinates of the area images according to the pre-reading ranges and the original coordinates corresponding to the vertex coordinates, wherein one area image corresponds to one prediction small block image; the processor converts each area image into a small block image corresponding to the rotation image, compresses the small block images to form a compressed code stream, sends the compressed code stream to the display terminal, and decompresses the compressed code stream by the display terminal to obtain the rotation image.
As can be seen from the above scheme, in the compression technique, the image is first decomposed into 8×8 image blocks, and then the subsequent operation is performed. In the present application, the vertex coordinates of the 8×8 image block, that is, the vertex coordinates of the plurality of predicted small block images, are first set in advance before the image is rotated. The original coordinates of the original image are calculated through the vertex angle coordinates, the pre-reading range is determined through the original coordinates of the original image, each pixel point is obtained from the pre-reading range when each pixel point of the regional image is read, and the whole image is not required to be traversed when each pixel point is read, so that the processing amount of data is reduced. Since the region image is converted into each small image of the rotation image, the rotation image is not required to be divided into 8×8 image blocks when the compression is performed, and the next step of compressing the plurality of small images is directly performed, so that the processing amount of the processor when the image is compressed is reduced. Since the prediction block image is divided according to a compression rule, the prediction block image is divided according to a rectangular grid. Since the original image has a certain rotation angle, the area image of the original image is determined to be oblique, not rectangular, from the predicted image. And when the area image is converted into each small block image, each small block image is converted into a rectangular image. In the subsequent compression, the rotating image is not required to be divided into 8×8 image blocks, and the next step of compressing a plurality of small images is performed, so that the processing amount of a processor in the process of compressing the image is reduced. And the rotating pictures are compressed and then sent to the display image, so that the transmitted data quantity is reduced, the transmission distance is increased, and the transmission error is avoided. By setting the reference image, and setting the pre-read range, while reducing the data amount reading,
the method can ensure that the blocking step is reduced during compression, and the data volume processed by a processor is reduced.
In a further aspect, the converting each area image into a small image corresponding to the rotation image includes: and calculating each original coordinate of the area image according to the rotation formula to obtain the target coordinate of each small image, and assigning the pixel value of the original coordinate to the pixel value of the target coordinate.
Therefore, the pixel value of the original pixel point coordinate is assigned to the pixel value of the target pixel point coordinate by calculating the target pixel point coordinate corresponding to each original pixel point of the area image, so that the small block image can be obtained. And the pixel values of the area image are obtained from the pre-read range.
In a further scheme, after confirming the pre-reading range according to the original coordinates, the method further comprises the following steps: and reading the pixel values of the pixels in each pre-reading range in the original image, and storing the pixel values of the pixels in the read pre-reading range in a memory.
Therefore, after the pre-reading range is determined, the pixels in the pre-reading range need to be pre-stored, so that the pixels required to be traversed by the pixels for reading the area image can be reduced when the area image in the pre-reading range is read.
In a further scheme, according to the pixel points in the pre-reading range included in the pre-reading range read area image, pixel values corresponding to all original coordinates of the area image are read.
Therefore, when the regional image in the pre-reading range is read, the pixel points required to be traversed for reading the pixel points of the regional image can be reduced.
In a further aspect, after converting each area image into a rotation image, further performing: the display terminal judges whether each target coordinate of the rotating image is in a preset display area or not; if the target coordinates are not in the preset display area, the processor deletes the pixel points of the target coordinates which are not in the display area.
It follows that cropping of the rotated image is required, since the rotated pattern obtained after conversion may appear to exceed the display area. And the rotated images are stitched for each tile.
In a further aspect, the processor calculates the original coordinates of the original image of each vertex angle coordinate according to the rotation formula, including: and converting each vertex angle coordinate into a central vertex angle coordinate of a central point coordinate system, calculating each central original coordinate corresponding to each central vertex angle coordinate according to a rotation formula, and converting each central original coordinate into an original coordinate according to the central point coordinate system.
It can be seen that when the original coordinates of each vertex angle coordinate are calculated by the rotation formula, the vertex angle coordinate needs to be converted into the center vertex angle coordinate, and when the rotation calculation is performed by using the center point coordinate system, the occurrence of coordinate distortion or deformation caused by the coordinate system transformation is avoided.
In order to achieve the second object, the present invention provides an endoscope apparatus, wherein an image collector is used for collecting an original image, an angle sensor is used for collecting a rotation angle, and a memory is used for storing the original image and the rotation angle; the image rotation calculation unit is used for setting a plurality of vertex angle coordinates of a plurality of prediction small block images of the prediction rotation image; the image rotation calculation unit is used for obtaining the rotation angle output by the angle sensor, calculating the original coordinates of the original image of each vertex angle coordinate according to the rotation formula, and forming an area image corresponding to each small image by each original coordinate; the image pre-reading unit is used for determining a pre-reading range of an original image according to the original coordinates, wherein the pre-reading range of the original image is a part of the original image, and converting each area image into each small image of the rotating image according to pixel values corresponding to each original coordinate of the pre-reading range reading area image; the image compression coding unit is used for compressing a plurality of small images to form a compressed code stream, and the compressed code stream is sent to the display terminal through the transmission module; the display terminal is used for decompressing the compressed code stream to obtain a rotation image.
In a further scheme, the processor further comprises an image clipping unit; the image clipping unit is used for deleting pixel points of original coordinates which are not in the display area in the rotation image.
As can be seen from the above, the inspection device is used for capturing images and processing the images, and the display terminal is used only for displaying the rotated images. When the image is processed by the inspection device, the display terminal is not necessarily a specific display terminal, and other display terminals may be used for display, for example, a mobile phone display or the like. Further, by determining the pre-reading range, each pixel is obtained from the pre-reading range when each pixel of the area image is read, instead of traversing the entire image when each pixel is read, thereby reducing the throughput of data. When transmitting data to the display terminal, the data is compressed, the data compression amount is reduced, the amount of data to be transmitted is reduced, the transmission distance is increased, and the data transmission error probability is reduced.
In order to achieve the third object, the present invention provides a storage medium having a computer program stored thereon, which when executed, implements the method for correcting an image of an endoscope apparatus described above.
Drawings
Fig. 1 is a block diagram showing a system configuration of an embodiment of an endoscope apparatus of the present invention.
Fig. 2 is a schematic view of pixels of an original image acquired by an embodiment of a method for correcting an image of an endoscopic device of the present invention.
Fig. 3 is a flowchart of an embodiment of a method for correcting an image of an endoscope apparatus of the present invention.
Fig. 4 is a schematic view of an original image and a predicted rotation image of an embodiment of a method of correcting an image of an endoscope apparatus of the present invention.
Fig. 5 is a schematic view of a pre-reading range of an embodiment of a correction method of an image of an endoscope apparatus of the present invention.
Fig. 6 is a schematic view of a preset display area of an embodiment of a method for correcting an image of an endoscopic device of the present invention.
The invention is further described below with reference to the drawings and examples.
Detailed Description
Endoscopic embodiment:
referring to fig. 1, fig. 1 is a block diagram showing the system configuration of an embodiment of an endoscope apparatus of the present invention. The endoscope apparatus comprises an examination apparatus 1 and a display terminal 3, wherein the examination apparatus 1 comprises an image collector 11, a memory 13, an angle sensor 12, a transmission module 14 and a processor 2. The processor 2 includes an image rotation calculation unit 21, an image pre-reading unit 22, an image cropping unit 23, and an image compression encoding unit 24. The image collector 11 is used for collecting an original image, and the angle sensor 12 is used for collecting a rotation angle, wherein the rotation angle is an angle at which the inspection device 1 rotates after determining the direction of a forward image. The memory is used for storing the original image and the rotation angle. The image rotation calculation unit 21 is configured to establish a plurality of vertex coordinates of a plurality of small block images of the predictive rotation image, and calculate original coordinates of the original image from the vertex coordinates. The image pre-reading unit 22 determines a pre-reading range from the original coordinates corresponding to the vertex coordinates, obtains region images from the pre-reading range, and calculates each region image to obtain each small image of the rotation image. The image cropping unit 23 is used for cropping the rotated image. The image compression encoding unit 24 is configured to compress each small image to form a compressed code stream, and transmit the compressed code stream to the display terminal 3 through the transmission module 14. The transmission module 14 may be a wireless transmission module or a wired transmission module.
Referring to fig. 2, after the image collector 11 collects the original image, pixel data of the original image is written into the memory according to a row-column sequence, and in this embodiment, the resolution of the original image is 1280×720.
An embodiment of a method for correcting an image of an endoscope apparatus:
referring to fig. 3, fig. 3 is a flowchart of an embodiment of a method for correcting an image of an endoscopic device of the present invention. First, step S1 is executed, where the processor sets a plurality of vertex angle coordinates of a plurality of predicted tile images of the predicted rotated image according to a compression rule. In the compression technique, the rotation image is first divided into 8×8 image blocks, and then the subsequent operation is performed. The processor divides the prediction rotated image into a plurality of prediction block images according to a compression rule, each of which corresponds to one of the 8 x 8 image blocks in the compression technique. And the vertex angle coordinates are coordinates of four vertex angle pixel points in the predicted small block image. The processor may set a plurality of vertex coordinates of a plurality of predicted tile images of the predicted rotated image only once, the vertex coordinates being used in subsequent image processing.
And setting a plurality of vertex angle coordinates of a plurality of predicted small block images of the predicted rotating image, and converting the area image of the subsequent original image into a small block image to provide a reference value, so that the converted small block image is rectangular, and the data processing amount when the processor compresses is reduced when the compression is performed subsequently.
After the processor sets the plurality of vertex angle coordinates, step S2 is executed, the processor obtains the rotation angle and the original image, and calculates each original coordinate of the original image corresponding to each vertex angle coordinate. The original coordinates corresponding to the vertex angle coordinates can be calculated by a rotation formula. The rotation angle is output by an angle sensor.
Referring to fig. 4, fig. 4 is a schematic view of an original image and a predicted rotation image of an embodiment of a method of correcting an image of an endoscope apparatus of the present invention. The O1 image is an original image acquired in the present embodiment, and the O2 image is a predicted rotation image. The original image O1 is tilted with respect to the predicted rotation image O2 by the rotation angle θ. Wherein a, b, c, d is a pixel point of four vertex coordinates of one prediction tile image in the prediction rotated image.
When the processor calculates the original coordinates of the original image corresponding to the vertex coordinates, each vertex coordinate is converted into a center vertex coordinate of the center point coordinate system. Taking the pixel point d as an example, in the predicted rotated image O2, the vertex angle coordinate value of the pixel point d is (dx 2, dy 2). And the center point coordinates of the pixel point d are (dx 2 ', dy 2'), wherein dx2 '=dx2-W/2, and dy2' =dy2-H/2. Where W is the number of pixels in the row direction of the predicted rotated image O2, and H is the number of pixels in the column direction of the predicted rotated image O2.
After the processor obtains the central vertex angle coordinates, calculating the original coordinates of each center corresponding to each central vertex angle coordinate according to the rotation formula. Taking the pixel point d as an example, after the central point coordinate is (dx 2 ', dy 2'), calculating the central original coordinate (dx 1 ', dy 1'). Where dx1 '=dx2' ×cos θ -dy2 '×sin θ, dy1' =dx2 '×sin θ+dy2' ×cos θ.
After the processor obtains the center original coordinates, each center original coordinate is converted into an original coordinate on the O1 image according to the center point coordinate system. Taking the pixel point d as an example, the original coordinates corresponding to the pixel point d are (dx 1, dy 1). Wherein dx1=w/2+dx1 ', dy1=h/2-dy1'.
After the processor obtains each original coordinate of the original image corresponding to each vertex angle coordinate, step S3 is executed, a pre-reading range of the original image is determined according to each original coordinate, and a pixel value corresponding to each original coordinate of the area image is read according to the pre-reading range. After the pre-reading range of the original image is determined, pixel values of all pixel points in each pre-reading range are pre-read in the original image, and the pixel values of the read pixel points are stored in a memory.
Since the prediction block image is divided according to a compression rule, the prediction block image is divided according to a rectangular grid. Since the original image has a certain rotation angle, the area image of the original image is determined to be oblique, not rectangular, from the predicted image.
The reading of the area image according to the pre-reading range includes: and traversing pixel points in a pre-reading range in the memory, and reading pixel values corresponding to original coordinates of the regional image. Wherein one region image corresponds to one prediction tile image.
Referring to fig. 5, after the original coordinates of the pixel point a, b, c, d are obtained, the original coordinates of the pixel point a, b, c, d are wired from the original image, and then the area image is obtained. In the area image, it can be known that the area image is within the area range of the connection line of the pixel points a1, b1, c1, d1, and the area range is defined as the pre-reading range of the area image, and all the pixel points of the pre-reading range are read. In this embodiment, the pre-reading range is only a part of the original image, preferably, the number of pixels of the pre-reading range is much smaller than that of the original image, and the pre-reading range needs to fully contain the area image. Further, four vertexes of the area image are respectively located on four sides of the pre-reading range. When the pixel value of the original coordinate of the area image is read, the pixel value of the pixel point of the pre-reading range is traversed, and the area image is read.
When each pixel point of the regional image is read, each pixel point is obtained from a pre-reading range, rather than the whole image needs to be traversed when each pixel point is read, and therefore the processing amount of data is reduced.
After the processor reads the pixel values of each original coordinate of the area image, step S4 is executed, and the processor compresses the plurality of small images according to each small image converted from each area image into the rotation image to form a compressed code stream and sends the compressed code stream to the display terminal. And the processor calculates each original coordinate of the area image according to the rotation formula to obtain the target coordinate of each small image, and assigns the pixel value of the original coordinate to the pixel value of the target coordinate. After the processor obtains each small image, the images can be spliced to obtain a rotation image. And when the area image is converted into each small block image, each small block image is a rectangular image. In the subsequent compression, the rotating image is not required to be divided into 8×8 image blocks, and the next step of compressing a plurality of small images is performed, so that the processing amount of a processor in the process of compressing the image is reduced.
After the processor converts each region image into a rotation image, the processor does not compress a plurality of small images immediately to form a compressed code stream, the compressed code stream is sent to the display terminal, and after the rotation image is obtained, the processor also cuts the rotation image, wherein the processor judges whether each target coordinate of the target rotation image is in a preset display region or not. Referring to fig. 6, W is set as the number of pixels in the row direction of the rotated image, and H is the number of pixels in the column direction of the rotated image in this embodiment, where the preset display area is circular. And judging the target coordinates through a formula, wherein the target coordinates are set to be (x, y), and if the target coordinates meet the formula abs (x-W/2) x abs (x-W/2) +abs (H/2-y) x abs (H/2-y) < abs (H x H), indicating that the target coordinates are in the preset display area.
If the target coordinates are not in the preset display area, the processor deletes the pixel points of the target coordinates which are not in the display area. If the target coordinate is in the preset display area, reserving the pixel point of the target coordinate. The rotated image is cropped by this step, i.e. the small image is cropped. And after the cutting is finished, compressing the plurality of cut small images to form a compressed code stream, and transmitting the compressed code stream to the display terminal.
In this embodiment, a standard image compression technique (JPEG/MJPEG) is used to perform compression encoding on a plurality of small-block images, where the image is not required to be divided into 8×8 image blocks, and after the plurality of small-block images are obtained, a forward discrete cosine transform step is directly performed on the plurality of small-block images, so that the processing capacity of a processor when compressing the image is reduced.
After the processor obtains each small image, step S5 is executed, and the display terminal decompresses the compressed code stream to obtain a rotation image. And after the display terminal obtains the rotation image, displaying the rotation image, wherein the rotation image is the corrected rotation image. And the rotation picture is compressed and then sent to the display image, so that the transmitted data quantity is reduced, and the transmission error is avoided.
If the method for correcting an image of the endoscope apparatus according to the present embodiment is not applied, the original image is directly divided into a plurality of small blocks, the plurality of small blocks are pre-read in the memory, and the small blocks are converted into oblique forward small block images during the rotation operation while the processing amount of data can be reduced during the rotation operation. While each oblique forward tile image is an irregularly shaped tile, more complex calculations are required to smooth the image as each oblique forward tile image is compressed. Therefore, in order to reduce the data processing amount of the compression by the processor, the forward image needs to be subdivided into 8×8 image blocks and then compressed, which results in an increase in the number of steps of the processor for processing the compression, and an increase in the data amount of the processor for compression.
Therefore, in the present embodiment, the plurality of predicted small block images of the predicted rotated image and the vertex angle coordinates of each predicted small block image are set in advance so that the amount of data at the time of compression can be reduced. In addition, the method of the embodiment confirms the pre-reading range of the area image according to the area image, each pixel point is obtained from the pre-reading range, instead of traversing the whole image when each pixel point is read, and therefore the processing amount of data is reduced.
Storage medium embodiment:
the method for correcting an image of an endoscope apparatus in an endoscope apparatus described in the above-described embodiment may be stored in a computer-readable storage medium in the form of a computer program which, when executed by a processor, can perform the steps of the method embodiment for correcting an image of an endoscope apparatus in a computer apparatus described above. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing is merely a preferred embodiment of the present invention, but the inventive design concept is not limited thereto, and many other equivalent embodiments can be included without departing from the scope of the invention, as will be apparent to those skilled in the art.

Claims (9)

1. A method for correcting an image of an endoscope apparatus, comprising:
setting a plurality of vertex angle coordinates of a plurality of predicted small block images of the predicted rotation image according to a compression rule;
acquiring a rotation angle output by an angle sensor, acquiring an original image, and calculating original coordinates of the original image corresponding to each vertex angle coordinate according to a rotation formula;
determining each pre-reading range of the original image according to the original coordinates corresponding to each vertex angle coordinate, wherein the pre-reading range of the original image is a part of the original image;
reading pixel values corresponding to original coordinates of an area image according to the pre-reading ranges and the original coordinates corresponding to the vertex coordinates, wherein one area image corresponds to one prediction small block image;
converting each region image into a small block image corresponding to a rotation image, compressing a plurality of small block images to form a compressed code stream, sending the compressed code stream to a display terminal, decompressing the compressed code stream by the display terminal, and obtaining the rotation image.
2. The method for correcting an image of an endoscope apparatus according to claim 1, wherein:
the converting of each region image into each small image corresponding to the rotation image comprises the following steps: and calculating each original coordinate of the area image according to the rotation formula to obtain a target coordinate of each small image, and assigning the pixel value of the original coordinate to the pixel value of the target coordinate.
3. The method for correcting an image of an endoscope apparatus according to claim 2, wherein:
after determining each pre-reading range according to the original coordinates corresponding to each vertex angle coordinate, executing: and pre-reading pixel values of all pixel points in each pre-reading range in the original image, and storing the pixel values of the read pixel points in a memory.
4. A method for correcting an image of an endoscope apparatus according to claim 3, wherein:
the reading of the area image according to the pre-reading range comprises the following steps: and traversing the pixel points in the pre-reading range in the memory, and reading the pixel values corresponding to the original coordinates of the region image.
5. The method for correcting an image of an endoscope apparatus according to any one of claims 1 to 4, characterized in that:
after converting each of the region images into a rotation image, further performing: judging whether each target coordinate of the rotating image is in a preset display area or not;
and if the target coordinates are not in the preset display area, deleting the pixel points of the target coordinates which are not in the display area.
6. The method for correcting an image of an endoscope apparatus according to any one of claims 1 to 4, characterized in that:
the calculating of the original coordinates of the original image of each vertex angle coordinate according to the rotation formula comprises: and converting each vertex angle coordinate into a central vertex angle coordinate of a central point coordinate system, calculating each central original coordinate corresponding to each central vertex angle coordinate according to a rotation formula, and converting each central original coordinate into each original coordinate according to the central point coordinate system.
7. The endoscope device comprises an inspection device and a display terminal, wherein the inspection device comprises an image collector, an angle sensor, a memory, a processor and a transmission module, and is characterized in that: the processor is provided with an image rotation calculation unit, an image pre-reading unit and an image compression encoding unit;
the image acquisition device is used for acquiring an original image, the angle sensor is used for acquiring a rotation angle, and the memory is used for storing the original image and the rotation angle;
the image rotation calculation unit is used for setting a plurality of vertex angle coordinates of a plurality of prediction small block images of the prediction rotation image;
the image rotation calculation unit is used for obtaining the rotation angle output by the angle sensor, calculating the original coordinates of the original image of each vertex angle coordinate according to a rotation formula, and forming an area image corresponding to each small image by each original coordinate;
the image pre-reading unit is used for determining a pre-reading range of the original image according to the original coordinates, wherein the pre-reading range of the original image is a part of the original image, and the pixel values corresponding to the original coordinates of the area image are read according to the pre-reading range so as to convert the area image into small block images of the rotating image;
the image compression coding unit is used for compressing a plurality of small images to form a compressed code stream, and the compressed code stream is sent to the display terminal through the transmission module;
the display terminal is used for decompressing the compressed code stream to obtain the rotation image.
8. An endoscopic device according to claim 7, wherein:
the processor also comprises an image clipping unit;
the image clipping unit is used for deleting pixel points of original coordinates which are not in the display area in the rotation image.
9. A storage medium, characterized in that: a computer program stored thereon, which when executed, implements a method of correcting an image of an endoscopic device as defined in any one of claims 1 to 6.
CN202311813873.XA 2023-12-27 2023-12-27 Method for correcting image of endoscope device, and storage medium Active CN117478803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311813873.XA CN117478803B (en) 2023-12-27 2023-12-27 Method for correcting image of endoscope device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311813873.XA CN117478803B (en) 2023-12-27 2023-12-27 Method for correcting image of endoscope device, and storage medium

Publications (2)

Publication Number Publication Date
CN117478803A true CN117478803A (en) 2024-01-30
CN117478803B CN117478803B (en) 2024-04-12

Family

ID=89627839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311813873.XA Active CN117478803B (en) 2023-12-27 2023-12-27 Method for correcting image of endoscope device, and storage medium

Country Status (1)

Country Link
CN (1) CN117478803B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040240745A1 (en) * 2003-02-28 2004-12-02 Ntt Docomo, Inc. Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method and image decoding program
CN105528758A (en) * 2016-01-12 2016-04-27 武汉精测电子技术股份有限公司 Image remapping method and device based on programmable logic device
CN108492243A (en) * 2018-04-13 2018-09-04 福州新迪微电子有限公司 It is a kind of based on block processing picture orbiting facility, system and method
CN108898539A (en) * 2018-05-14 2018-11-27 湘潭大学 A kind of color image encrypting method of compatible JPEG compression standard
CN113255656A (en) * 2020-12-18 2021-08-13 深圳怡化时代智能自动化系统有限公司 Image rotation method, device, equipment and storage medium
CN114723612A (en) * 2022-03-09 2022-07-08 南京图格医疗科技有限公司 Method and device for correcting rotation of endoscope image
CN114913076A (en) * 2022-07-19 2022-08-16 成都智明达电子股份有限公司 Image scaling and rotating method, device, system and medium
CN115129278A (en) * 2021-03-17 2022-09-30 炬芯科技股份有限公司 Image display control method, system, readable storage medium and electronic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040240745A1 (en) * 2003-02-28 2004-12-02 Ntt Docomo, Inc. Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method and image decoding program
CN105528758A (en) * 2016-01-12 2016-04-27 武汉精测电子技术股份有限公司 Image remapping method and device based on programmable logic device
CN108492243A (en) * 2018-04-13 2018-09-04 福州新迪微电子有限公司 It is a kind of based on block processing picture orbiting facility, system and method
CN108898539A (en) * 2018-05-14 2018-11-27 湘潭大学 A kind of color image encrypting method of compatible JPEG compression standard
CN113255656A (en) * 2020-12-18 2021-08-13 深圳怡化时代智能自动化系统有限公司 Image rotation method, device, equipment and storage medium
CN115129278A (en) * 2021-03-17 2022-09-30 炬芯科技股份有限公司 Image display control method, system, readable storage medium and electronic device
CN114723612A (en) * 2022-03-09 2022-07-08 南京图格医疗科技有限公司 Method and device for correcting rotation of endoscope image
CN114913076A (en) * 2022-07-19 2022-08-16 成都智明达电子股份有限公司 Image scaling and rotating method, device, system and medium

Also Published As

Publication number Publication date
CN117478803B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US8098959B2 (en) Method and system for frame rotation within a JPEG compressed pipeline
CN109194923B (en) Video image processing device, system and method based on local non-uniform resolution
CN108564551B (en) Fisheye image processing method and fisheye image processing device
US20090073277A1 (en) Image processing apparatus, image processing method and image pickup apparatus
US4974078A (en) Digital compression method and system with improved coding efficiency
US20020034316A1 (en) Monitoring system
CN109688413B (en) Method and encoder for encoding a video stream in a video encoding format supporting auxiliary frames
KR101009108B1 (en) Image processing apparatus and image processing method
JP3469747B2 (en) Image reading device
JP4608436B2 (en) Image shooting device
CN117478803B (en) Method for correcting image of endoscope device, and storage medium
JP2012085214A (en) Data compression method and data compression device
WO1998058495A1 (en) Image processor and image processing method
US9398310B2 (en) Method and apparatus for super-resolution video coding using compressive sampling measurements
CN116489457A (en) Video display control method, device, equipment, system and storage medium
WO2023280266A1 (en) Fisheye image compression method, fisheye video stream compression method and panoramic video generation method
CN115278189A (en) Image tone mapping method and apparatus, computer readable medium and electronic device
JP5521641B2 (en) Method and apparatus for compressing image processing data, and image pickup apparatus having the same
WO2015098721A1 (en) Image processing device, image processing method, image processing program, and imaging device
JP2002314984A (en) Monitoring camera system
CN113709494A (en) Image decompression method and device for super-resolution reconstruction
JPH11215482A (en) Monitoring system
JPH02141880A (en) Copy body separating and extracting device
CN112911186B (en) Image storage method and device, electronic equipment and storage medium
JP2001043359A (en) Image processor and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant