CN114155254A - Image cutting method based on image correction, electronic device and medium - Google Patents

Image cutting method based on image correction, electronic device and medium Download PDF

Info

Publication number
CN114155254A
CN114155254A CN202111501958.5A CN202111501958A CN114155254A CN 114155254 A CN114155254 A CN 114155254A CN 202111501958 A CN202111501958 A CN 202111501958A CN 114155254 A CN114155254 A CN 114155254A
Authority
CN
China
Prior art keywords
video picture
video
picture
pixel
ray
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
CN202111501958.5A
Other languages
Chinese (zh)
Other versions
CN114155254B (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.)
Chengdu Zhiyuanhui Information Technology Co Ltd
Original Assignee
Chengdu Zhiyuanhui Information 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 Chengdu Zhiyuanhui Information Technology Co Ltd filed Critical Chengdu Zhiyuanhui Information Technology Co Ltd
Priority to CN202111501958.5A priority Critical patent/CN114155254B/en
Publication of CN114155254A publication Critical patent/CN114155254A/en
Application granted granted Critical
Publication of CN114155254B publication Critical patent/CN114155254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Abstract

The invention discloses a picture cutting method based on image correction, an electronic device and a medium, comprising the following steps: s1, acquiring a video stream sent by the X-ray machine; s2, intercepting each frame of video picture according to the video stream to obtain a video picture sequence; s3, sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, carrying out cutting comparison based on graph correction until the characteristic values are matched, storing the matched video pictures to an X-ray picture set, and circulating the step S3; and S4, merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream. The invention retains the main characteristics of the pixel matrix and reduces the parameters and the calculated amount through the pooling posing treatment, and reduces the errors of the translation, the rotation and the scaling of the pixel through the relative invariance after the pooling.

Description

Image cutting method based on image correction, electronic device and medium
Technical Field
The invention relates to the field of image processing, in particular to a picture cutting method based on image correction, electronic equipment and a medium.
Background
In a security inspection scene, there is a need to convert the video signal of an X-ray machine into a picture. Under the demand scene, the video needs to be cut continuously, so that the imaging pictures of the X-ray machine of the article entering the security inspection machine can be cut off without repetition and omission.
In the video of the X-ray machine, it is likely that a pixel information point is not a perfect straight line in the process of moving from one side to the other side, when a pixel point in an S frame moves into an E frame, two pixel points, even three pixel points, may move up or down, and may fast or slow down several pixel points to the left or right, or both of them may exist, and such a change of one pixel and a change of pixels of other surrounding points are linked, which may cause a pixel translation, rotation, and scaling error.
Disclosure of Invention
The invention aims to provide a picture cutting method, electronic equipment and a medium based on image correction, wherein pooling posing processing is adopted, a group of adjacent pixels in a certain range are compared, and a minimum value of the group of pixels is output, so that the problems of pixel translation, rotation and scaling errors when video signals of an existing X-ray machine are converted into pictures are solved.
The image cutting method based on image correction specifically comprises the following steps:
s1, acquiring a video stream sent by the X-ray machine;
s2, intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
s3, sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, carrying out cutting contrast based on graph correction, storing the matched video pictures to an X-ray picture set until the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture, and circulating the step S3;
and S4, merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
Further, the step S3 specifically includes the following steps:
s301, obtaining a video picture Fm to be cut and compared according to the video picture sequence;
s302, shearing the video picture Fm according to a first preset area to obtain a pixel matrix S, and pooling the minimum value of the pixel matrix S to obtain a feature matrix Ω S; (ii) a
S303, sequentially traversing each video picture after the Fm, and cutting the currently traversed video picture according to a second preset area when each video picture is traversed to obtain a pixel matrix E corresponding to the currently traversed video picture;
s304, performing minimum pooling on the pixel matrix E to obtain a feature matrix omega E;
s305, judging whether the characteristic matrix Ω S is matched with the characteristic matrix Ω e, and if so, turning to the step S306; if not, go to step S307;
s306, after the traversal is finished, storing the video picture corresponding to the characteristic value omega e into an X-ray picture set, obtaining a video picture when the next parcel enters the X-ray machine, updating the video picture Fm, and circulating the steps S302-S305;
and S307, continuously traversing the next frame of video picture, and calculating the corresponding characteristic value omega e until the video picture with the corresponding characteristic value omega e equal to the characteristic value omega S is found.
Further, the minimum value pooling is to use a square window with a side length of a, and the pixel matrix S or the pixel matrix E is scanned in the horizontal direction and the vertical direction with a step length of b.
Further, the first preset area and the second preset area are arranged according to the direction of an X-ray machine conveyor belt and are symmetrical based on the center line of the video picture Fm.
Further, when the direction of conveying the X-ray machine conveyor belt is from right to left, the coordinate of the uppermost left corner in the video picture Fm is set to be (0,0), the first preset area is the coordinate of the uppermost left corner to be (w, h), the width is c pixels, the height is a rectangular area of r pixels, and w, h, c and r meet the following requirements: w + c is the horizontal pixel of the current frame video picture Fm, and c + r is the vertical pixel of the current frame video picture Fm.
Further, the matching in step S305 is determined according to the following: and counting the number of different elements in the corresponding positions of the feature matrix Ω s and the feature matrix Ω e, and judging to be matched when the number of the different elements is less than a specified threshold value, otherwise, judging to be unmatched.
Further, the step S2 and the step S3 further include a color information reduction step:
and extracting the RGB color information of each pixel point of each video picture in the video picture sequence, and reducing the RGB color information of each pixel point to obtain the video picture sequence after reducing.
Further, the preset rule of step S4 is:
traversing from the video picture which is firstly stored in the X-ray picture set, and sequentially extracting one video picture and the next video picture adjacent to the video picture;
extracting pixel information of a first preset area of a previous video picture and pixel information of a second preset area of a next video picture according to the two adjacent video pictures;
performing regional image fusion on the pixel information of the second preset region and the pixel information of the first preset region to generate fusion package information;
and synthesizing all the fusion package information and pixel information of a second preset area corresponding to the video picture which is firstly stored in the X-ray picture set to obtain all the package information in the video stream.
Cut picture electronic equipment based on image correction includes:
one or more processors;
a storage unit configured to store one or more programs that, when executed by the one or more processors, enable the one or more processors to implement the color compensation-based map cutting method according to any one of claims 1 to 8, the one or more programs including:
the acquisition module is used for acquiring a video stream sent by the X-ray machine;
the picture sequence module is used for intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
the cutting comparison module is used for sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, cutting and comparing based on graph correction, and storing the matched video pictures to an X-ray picture set and circulating the matched video pictures when the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture;
and the merging module is used for merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the method for image correction based cropping.
The invention has the following beneficial effects:
1. through pooling posing, main characteristics of a pixel matrix are kept, parameters and calculated amount are reduced, pixel translation, rotation and scaling errors are reduced through relative invariance after pooling, overfitting is prevented, and since the video of an X-ray machine is RGB with a white base, and an article is represented by orange, green and blue colors, in this case, valuable pixel information is information except white, white pixel values in RGB24 pixel information are the largest, and therefore minimum pooling is used, and more useful information is extracted.
2. According to the working principle of the X-ray machine, each video picture is cut through a preset area and compared with a characteristic value, an X-ray picture set containing all package information is obtained, repeated redundant information of redundant pictures is reduced, and meanwhile, omission of the package information is avoided.
Drawings
FIG. 1 is a schematic flow chart of a method for cutting a picture based on image correction according to the present invention;
FIG. 2 is a schematic diagram of an electronic device for cutting images based on image correction according to the present invention;
FIG. 3 is a schematic view of a pixel matrix S according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram of a pixel change of the pixel matrix E according to embodiment 1 of the present invention;
FIG. 5 is a schematic diagram illustrating a comparison between a reduced pixel matrix S and a reduced pixel matrix E according to the present invention;
fig. 6 is a schematic diagram of Fm frame video picture cropping comparison in embodiment 1 of the present invention;
FIG. 7 is a schematic diagram of cropping contrast of Fm +1 frame video pictures according to embodiment 1 of the present invention;
FIG. 8 is a schematic diagram of Fm + n-1 frame video picture cropping contrast of embodiment 1 of the present invention;
FIG. 9 is a schematic diagram of cropping contrast of Fm + n frames of video pictures according to embodiment 1 of the present invention;
FIG. 10 is a data flow diagram of a graph cutting method of the present invention;
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited to these examples.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "longitudinal", "lateral", "horizontal", "inner", "outer", "front", "rear", "top", "bottom", and the like indicate orientations or positional relationships that are based on the orientations or positional relationships shown in the drawings, or that are conventionally placed when the product of the present invention is used, and are used only for convenience in describing and simplifying the description, but do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be construed as limiting the invention.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "open," "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
The embodiment aims to provide a map cutting method based on color compensation and graphic correction, which specifically comprises the following steps:
s1, acquiring a video stream sent by the X-ray machine;
s2, intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
s3, extracting RGB color information of each pixel point of each video picture in the video picture sequence, and reducing the RGB color information of each pixel point to obtain a reduced video picture sequence;
specifically, the step S3 of reducing the rank specifically includes the following steps:
s301, dividing RGB color information of each pixel point of the video picture by 2nObtaining the RGB quotient value of each corresponding pixel point;
s302, refreshing corresponding RGB color information according to the RGB quotient value of each pixel point, and obtaining a video picture after order reduction.
Since the color is represented by binary, when the order of the pixel color information is reduced, a method of dividing the existing pixel color information by a multiple of 2 may be used, where let us say that the pixel color information is L, the pixel color information after reduction is O, the luminance order before reduction is n, and the luminance order after reduction is m, then:
O=L/2(n-m)
o is a quotient and the remainder is discarded, for example, we change the two 8-bit data with B being 60 and 61, i.e. the pixel with 256-order color to the pixel with 2-bit and 4-order color, then 56 and 57 respectively have the following calculation formula for decreasing the order:
60/2(8-2)
61/2(8-2)
the quotient calculated by both calculations is 0 and the R color information of both pixels becomes the same after the order is reduced.
Similarly, in RGB, the pixels G and B can be reduced to 4 orders by this method, so that the colors of the whole pixel are changed from 1678 to 4 × 4 — 64.
According to the practical situation, reasonable reduction orders can be selected, so that color errors caused by the change of pixel color information are eliminated, and unequal pixel matrixes S and E with characteristic values formed by original pixels become equal characteristic matrixes S and E with reduced orders of the pixel color information.
S4, sequentially calling video pictures corresponding to time from the video picture sequence after the package enters the X-ray machine according to the time sequence of the package entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, carrying out cutting contrast based on graph correction, storing the matched video picture to an X-ray picture set until the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture, and circulating the step S4;
specifically, the step S4 specifically includes the following steps:
s001, obtaining a video picture Fm to be cut and compared according to the reduced video picture sequence;
s002, shearing the video picture Fm according to a first preset area to obtain a pixel matrix S, and pooling the minimum value of the pixel matrix S to obtain a characteristic matrix Ω S; (ii) a
S003, sequentially traversing each video picture after the Fm, and cutting the currently traversed video picture according to a second preset area when each video picture is traversed to obtain a pixel matrix E corresponding to the currently traversed video picture;
s004, performing minimum pooling on the pixel matrix E to obtain a feature matrix omega E;
s005, judging whether the characteristic matrix omega S is matched with the characteristic matrix omega e, and if so, turning to the step S306; if not, go to step S307;
and S006, after traversing, storing the video picture corresponding to the characteristic value omega e into an X-ray picture set, acquiring a video picture when the next parcel enters the X-ray machine, updating the video picture Fm, and circulating the steps S002-S005.
And S007, continuously traversing the next frame of video picture, and calculating the corresponding characteristic value omega e until finding the video picture with the corresponding characteristic value omega e equal to the characteristic value omega S.
In a light machine scene, articles such as parcels in an X-ray video move from right to left along with a conveyor belt, and a frame signal Fm (the mth frame signal of the whole video, the current frame video picture Fm is a video picture when the parcel to be detected completely enters the X-ray machine) can be taken out from the video, in RGB24 pixels corresponding to a frame, a pixel matrix is cut from the rightmost side, the column of the matrix, that is, the width of the matrix in the video is denoted as c, the initial left bit is the w-th bit from left to right in the whole frame, the row of the matrix, that is, the height of the matrix in the video is denoted as r, the initial high bit is the h-th bit from top to bottom in the whole frame, the matrix itself is denoted as S, the position of the leftmost upper corner in the frame is (0,0), then the number of pixels possessed in the matrix is r c, and the position of the upper left corner of a quadrangle corresponding to the matrix is (w, h).
After the rightmost pixel matrix is truncated in the Fm frame, in frames Fm +1, Fm +2, Fm +3.. Fm + n following the Fm frame, a matrix of the same size is truncated from the leftmost position symmetrical to matrix S, denoted as E.
Comparing the characteristic values omega of the S pixel matrix and the E pixel matrix, selecting proper r values and c values to ensure that in a pixel set in a limited range (in the process of moving an article in an X-ray video from the right to the left), a non-identical information matrix has the same omega and is an impossible event in statistics, when the omega E of the E in the Fm + n frame is equal to the omega S of the S in the Fm frame, the rightmost pixel matrix S in the Fm frame moves to the leftmost side in the Fm + n frame at the moment, and the information in the frame is completely replaced by new information. Logically, we can consider that the old parcel item has gone out from the leftmost side and the new parcel item has occupied the whole screen from the leftmost side.
If the omega e in the Fm + n is not equal to the omega s in the Fm, continuously shearing and comparing the Fm + n +1 frame video pictures until the omega e is found.
When the Fm + n frame is in an Fm + n frame and omega e is equal to omega s, the whole Fm + n frame is selected as an X-ray picture and is marked as P1, the X-ray picture is added into an X-ray picture set, meanwhile, a frame video picture containing next wrapping information is taken as a new frame Fm to be cut and compared, a new omega s is recorded in a rightmost pixel frame corresponding to the new frame Fm to be cut, the next frame is continuously searched downwards, a new omega e is obtained from Fm +1, Fm +2 and Fm +3, whether the omega e is equal to the omega s or not is judged, until the new omega e is found, the Fm + k frame with the omega e being equal to the omega s is taken as a second picture and is cut out and is marked as P2.
Two pictures, P1 and P2, are considered as two consecutive video pictures, which contain the glue-like special function (glue information: pixel matrix S and pixel matrix E with the same eigenvalue Ω) at what positions to stick.
In this way, we continue to cut out P3, P4, P5..
The working principle of the X-ray machine is as follows: when an object to be detected enters the detection channel, a package detection sensor (light barrier) is shielded, a detection signal is sent to the control unit to generate an X-ray trigger signal, an X-ray emission source is triggered to emit X-rays, the X-rays form a very thin fan-shaped X-ray beam through the collimator, and the X-rays pass through the object to be detected and then reach the detector. The detector converts the optical signal of the X-ray into an electric signal, and then the outline, the composition and the material property of the object in the package are reproduced through image processing software. After the detected object passes through the detection area, the ray generator stops generating rays.
When the object is inspected, the very thin fan-shaped X-ray beam scans the object layer by layer, which is equivalent to slicing the object, the image acquisition system collects and stores image information of each layer of scanning line, and after the conveyor belt conveys the object to be inspected through the inspection area, the whole image information of the object to be inspected is obtained, including timestamp information of the object to be inspected entering, so that a frame video picture of corresponding time in the video is obtained according to the timestamp information of the object to be inspected entering.
If the side length of the pooled window is a and the step length is b, then, in a pixel matrix S which is c and is a row bit r, we can obtain a pooled feature matrix Ω S through pooling, each element in Ω S corresponds to each pooled window, and if the row n of Ω S is m, then:
n=(r-a)/b+1
m=(c-a)/b+1
similarly, we can also get the pooled feature matrix Ω e.
And S5, merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
In the picture set, the pixel information of all the pictures is merged, namely, P1U P2U P3U P4.
In the picture set, a set P ═ P1 ∞ P2 (P2 ∞ P3) U (P3 ∞ P4) of a union of two-to-two intersections of all pixel information is U (Pn-1 ∞ Pn), and P is a set E1, E2, E3..
Example 2
The embodiment aims to provide a graph cutting method based on graph correction, which specifically comprises the following steps:
s1, acquiring a video stream sent by the X-ray machine;
s2, intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
s3, sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, carrying out cutting contrast based on graph correction, storing the matched video pictures to an X-ray picture set until the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture, and circulating the step S4;
specifically, the step S3 specifically includes the following steps:
s001, obtaining a video picture Fm to be cut and compared according to the video picture sequence;
s002, shearing the video picture Fm according to a first preset area to obtain a pixel matrix S, and pooling the minimum value of the pixel matrix S to obtain a characteristic matrix Ω S; (ii) a
S003, sequentially traversing each video picture after the Fm, and cutting the currently traversed video picture according to a second preset area when each video picture is traversed to obtain a pixel matrix E corresponding to the currently traversed video picture;
s004, performing minimum pooling on the pixel matrix E to obtain a feature matrix omega E;
s005, judging whether the characteristic matrix omega S is matched with the characteristic matrix omega e, and if so, turning to the step S306; if not, go to step S307;
and S006, after traversing, storing the video picture corresponding to the characteristic value omega e into an X-ray picture set, acquiring a video picture when the next parcel enters the X-ray machine, updating the video picture Fm, and circulating the steps S002-S005.
And S007, continuously traversing the next frame of video picture, and calculating the corresponding characteristic value omega e until finding the video picture with the corresponding characteristic value omega e equal to the characteristic value omega S.
The specific principle of the pooling is as follows: as shown in table 1, we show that for a 4 x 4 matrix we 'scan' with a 2 x 2 pooling window, with step size 2, we select the minimum output as the feature matrix, as shown in table 2.
TABLE 1 matrix A
1 1 2 4
5 6 7 8
3 2 1 0
1 2 3 4
TABLE 2 pooling matrix A
1 2
1 0
If the side length of the pooled window is a and the step length is b, then, in a pixel matrix S which is c and is a row bit r, we can obtain a pooled feature matrix Ω S through pooling, each element in Ω S corresponds to each pooled window, and if the row n of Ω S is m, then:
n=(r-a)/b+1
m=(c-a)/b+1
similarly, we can also get the pooled feature matrix Ω e.
And S4, merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
In the picture set, the pixel information of all the pictures is merged, namely, P1U P2U P3U P4.
In the picture set, a set P ═ P1 ∞ P2 (P2 ∞ P3) U (P3 ∞ P4) of a union of two-to-two intersections of all pixel information is U (Pn-1 ∞ Pn), and P is a set E1, E2, E3..
Example 3
The present embodiment aims to provide an image-correction-based map-cutting electronic device, including:
one or more processors;
a storage unit configured to store one or more programs that, when executed by the one or more processors, enable the one or more processors to implement the graph cut method based on graph compensation, the one or more programs including:
the acquisition module is used for acquiring a video stream sent by the X-ray machine;
the picture sequence module is used for intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
the cutting comparison module is used for sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, cutting and comparing based on graph correction, and storing the matched video pictures to an X-ray picture set and circulating the matched video pictures when the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture;
and the merging module is used for merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
Embodiment 4 is a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, is capable of implementing the image correction-based cropping method.
The foregoing is only a preferred embodiment of the present invention, and the present invention is not limited thereto in any way, and any simple modification, equivalent replacement and improvement made to the above embodiment within the spirit and principle of the present invention still fall within the protection scope of the present invention.

Claims (10)

1. The image cutting method based on image correction is characterized by comprising the following steps:
s1, acquiring a video stream sent by the X-ray machine;
s2, intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
s3, sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, carrying out cutting contrast based on graph correction, storing the matched video pictures to an X-ray picture set until the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture, and circulating the step S3;
and S4, merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
2. The image correction-based map cutting method according to claim 1, wherein the step S3 specifically comprises the steps of:
s301, obtaining a video picture Fm to be cut and compared according to the video picture sequence;
s302, shearing the video picture Fm according to a first preset area to obtain a pixel matrix S, and pooling the minimum value of the pixel matrix S to obtain a feature matrix Ω S; (ii) a
S303, sequentially traversing each video picture after the Fm, and cutting the currently traversed video picture according to a second preset area when each video picture is traversed to obtain a pixel matrix E corresponding to the currently traversed video picture;
s304, performing minimum pooling on the pixel matrix E to obtain a feature matrix omega E;
s305, judging whether the characteristic matrix Ω S is matched with the characteristic matrix Ω e, and if so, turning to the step S306; if not, go to step S307;
s306, after the traversal is finished, storing the video picture corresponding to the characteristic value omega e into an X-ray picture set, obtaining a video picture when the next parcel enters the X-ray machine, updating the video picture Fm, and circulating the steps S302-S305;
and S307, continuously traversing the next frame of video picture, and calculating the corresponding characteristic value omega e until the video picture with the corresponding characteristic value omega e equal to the characteristic value omega S is found.
3. The image correction-based map cutting method according to claim 2, wherein the minimum value is pooled into a square window with a side length of a, and the pixel matrix S or the pixel matrix E is scanned in the horizontal direction and the vertical direction with a step length of b.
4. The image correction-based cropping method according to claim 2, wherein the first predetermined area and the second predetermined area are arranged according to the direction of an X-ray machine conveyor belt and are symmetrical based on the center line of the video picture Fm.
5. The image correction-based map cutting method according to claim 2, wherein when the direction of the X-ray machine belt transport is from right to left, the coordinate of the leftmost upper corner in the video picture Fm is set to (0,0), the first preset region is a rectangular region with coordinates of the leftmost upper corner being (w, h), width being c pixels and height being r pixels, and w, h, c, r satisfy: w + c is the horizontal pixel of the current frame video picture Fm, and c + r is the vertical pixel of the current frame video picture Fm.
6. The image correction-based cropping method according to claim 2, wherein the matching in step S305 is determined by: and counting the number of different elements in the corresponding positions of the feature matrix Ω s and the feature matrix Ω e, and judging to be matched when the number of the different elements is less than a specified threshold value, otherwise, judging to be unmatched.
7. The image correction-based map cutting method according to claim 2, wherein between the steps S2 and S3, further comprising a color information reduction step:
and extracting the RGB color information of each pixel point of each video picture in the video picture sequence, and reducing the RGB color information of each pixel point to obtain the video picture sequence after reducing.
8. The image correction-based map cutting method according to claim 1, wherein the preset rules of step S4 are:
traversing from the video picture which is firstly stored in the X-ray picture set, and sequentially extracting one video picture and the next video picture adjacent to the video picture;
extracting pixel information of a first preset area of a previous video picture and pixel information of a second preset area of a next video picture according to the two adjacent video pictures;
performing regional image fusion on the pixel information of the second preset region and the pixel information of the first preset region to generate fusion package information;
and synthesizing all the fusion package information and pixel information of a second preset area corresponding to the video picture which is firstly stored in the X-ray picture set to obtain all the package information in the video stream.
9. Cut picture electronic equipment based on image correction, characterized by comprising:
one or more processors;
a storage unit configured to store one or more programs that, when executed by the one or more processors, enable the one or more processors to implement the color compensation-based map cutting method according to any one of claims 1 to 8, the one or more programs including:
the acquisition module is used for acquiring a video stream sent by the X-ray machine;
the picture sequence module is used for intercepting each frame of video picture according to the video stream to obtain a video picture sequence;
the cutting comparison module is used for sequentially calling video pictures corresponding to time from the video picture sequence according to the time sequence of the packages entering the X-ray machine, traversing each video picture behind the reference video picture by taking the video picture as a reference, cutting and comparing based on graph correction, and storing the matched video pictures to an X-ray picture set and circulating the matched video pictures when the characteristic value of the traversed video picture is matched with the characteristic value of the reference video picture;
and the merging module is used for merging the video pictures in the X-ray picture set according to a preset rule to obtain the information of all packages in the video stream.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that,
the computer program is capable of implementing the image correction based map cutting method according to any one of claims 1 to 8 when executed by a processor.
CN202111501958.5A 2021-12-09 2021-12-09 Image cutting method based on image correction, electronic device and medium Active CN114155254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111501958.5A CN114155254B (en) 2021-12-09 2021-12-09 Image cutting method based on image correction, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111501958.5A CN114155254B (en) 2021-12-09 2021-12-09 Image cutting method based on image correction, electronic device and medium

Publications (2)

Publication Number Publication Date
CN114155254A true CN114155254A (en) 2022-03-08
CN114155254B CN114155254B (en) 2022-11-08

Family

ID=80454268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111501958.5A Active CN114155254B (en) 2021-12-09 2021-12-09 Image cutting method based on image correction, electronic device and medium

Country Status (1)

Country Link
CN (1) CN114155254B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114660097A (en) * 2022-03-23 2022-06-24 成都智元汇信息技术股份有限公司 Synchronous correction method and system based on double sources and double visual angles
CN114694064A (en) * 2022-03-23 2022-07-01 成都智元汇信息技术股份有限公司 Graph cutting method and system based on target identification

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110316963A1 (en) * 2008-12-30 2011-12-29 Huawei Device Co., Ltd. Method and device for generating 3d panoramic video streams, and videoconference method and device
WO2016037422A1 (en) * 2014-09-11 2016-03-17 刘鹏 Method for detecting change of video scene
CN111629262A (en) * 2020-05-08 2020-09-04 Oppo广东移动通信有限公司 Video image processing method and device, electronic equipment and storage medium
CN111831855A (en) * 2020-07-20 2020-10-27 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for matching videos
WO2020253618A1 (en) * 2019-06-21 2020-12-24 苏宁云计算有限公司 Video jitter detection method and device
CN113115037A (en) * 2021-06-15 2021-07-13 深圳市中鹏教育科技股份有限公司 Online education method, system, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110316963A1 (en) * 2008-12-30 2011-12-29 Huawei Device Co., Ltd. Method and device for generating 3d panoramic video streams, and videoconference method and device
WO2016037422A1 (en) * 2014-09-11 2016-03-17 刘鹏 Method for detecting change of video scene
WO2020253618A1 (en) * 2019-06-21 2020-12-24 苏宁云计算有限公司 Video jitter detection method and device
CN111629262A (en) * 2020-05-08 2020-09-04 Oppo广东移动通信有限公司 Video image processing method and device, electronic equipment and storage medium
CN111831855A (en) * 2020-07-20 2020-10-27 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for matching videos
CN113115037A (en) * 2021-06-15 2021-07-13 深圳市中鹏教育科技股份有限公司 Online education method, system, equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JIAMING WANG ET AL.: "Spatial–temporal pooling for action recognition in videos", 《NEUROCOMPUTING》 *
卞贤掌等: "基于语义分割的增强现实图像配准技术", 《电子技术与软件工程》 *
孟念鹏等: "一种基于SIFT的多视点视频颜色校正方法", 《电子测量技术》 *
黄敏: "基于视频的运动目标检测研究", 《中国博士学位论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114660097A (en) * 2022-03-23 2022-06-24 成都智元汇信息技术股份有限公司 Synchronous correction method and system based on double sources and double visual angles
CN114694064A (en) * 2022-03-23 2022-07-01 成都智元汇信息技术股份有限公司 Graph cutting method and system based on target identification

Also Published As

Publication number Publication date
CN114155254B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
CN114155473B (en) Picture cutting method based on frame compensation, electronic equipment and medium
CN114155254B (en) Image cutting method based on image correction, electronic device and medium
CN114140461B (en) Picture cutting method based on edge picture recognition box, electronic equipment and medium
TWI729995B (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
US8077976B2 (en) Image search apparatus and image search method
US4791676A (en) Method and means for efficiently handling boundary conditions in connected component labeling
CA2276408C (en) Method and apparatus for processing partial lines of scanned images
US11403742B2 (en) Image processing device, image processing method, and recording medium for generating bird's eye synthetic image
CN104144334B (en) Local-caption extraction for stereoscopic video content
US20240029387A1 (en) Image recognition method, electronic device and readable storage medium
CN114140542B (en) Picture cutting method based on color compensation, electronic equipment and medium
JPH0793561A (en) Edge and contour extractor
US20140301640A1 (en) Image evaluation device, image selection device, image evaluation method, recording medium, and program
US20230316697A1 (en) Association method, association system, and non-transitory computer-readable storage medium
US9977992B2 (en) Identifying points of interest in an image
JP4334981B2 (en) Image processing apparatus and image processing method
CN110443847B (en) Automatic vending machine holder positioning detection method based on camera
JP2019012424A (en) Image processing device and computer program
EP0216158A2 (en) Apparatus for analysing the connectivity of pixels in a raster scanned image frame
JP4682663B2 (en) Document processing device
JP2002159021A (en) Apparatus and method for displaying scale
CN114332543B (en) Multi-template security inspection image identification method, equipment and medium
JP4642620B2 (en) Method and apparatus for determining the location of run-length compressed data
EP2806625B1 (en) Image processing apparatus, image processing method, and non-transitory computer readable recording medium storing an image processing program
JP2011103023A (en) Method and device for reading color arrangement code

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