CN110782463B - Method and device for determining division mode, display method and equipment and storage medium - Google Patents

Method and device for determining division mode, display method and equipment and storage medium Download PDF

Info

Publication number
CN110782463B
CN110782463B CN201911057465.XA CN201911057465A CN110782463B CN 110782463 B CN110782463 B CN 110782463B CN 201911057465 A CN201911057465 A CN 201911057465A CN 110782463 B CN110782463 B CN 110782463B
Authority
CN
China
Prior art keywords
image
sub
images
difference
pixel
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.)
Active
Application number
CN201911057465.XA
Other languages
Chinese (zh)
Other versions
CN110782463A (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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN201911057465.XA priority Critical patent/CN110782463B/en
Publication of CN110782463A publication Critical patent/CN110782463A/en
Application granted granted Critical
Publication of CN110782463B publication Critical patent/CN110782463B/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
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a method for determining an image segmentation mode, which relates to the field of image processing and comprises the following steps: acquiring a plurality of sub-images obtained by image segmentation processing, wherein the plurality of sub-images are arranged in a plurality of rows and a plurality of columns; and determining an image segmentation mode in the image segmentation processing according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity of one sub-image and each of the rest sub-images. The invention also provides a display method, a determination device of the image segmentation method, electronic equipment and a computer readable storage medium. The invention can automatically determine the image segmentation mode without the operation of a user.

Description

Method and device for determining division mode, display method and equipment and storage medium
Technical Field
The present invention relates to the field of image processing, and in particular, to a method for determining an image segmentation method, a device for determining an image segmentation method, a display method, an electronic device, and a computer-readable storage medium.
Background
SDI (serial digital interface) is a video interface frequently used in the field of professional display, and is widely used in special monitors or medical monitors. Before the source image is transmitted to the SDI interface, image segmentation is carried out firstly, and then information of the segmented image is transmitted through the SDI interface. And after receiving the image information, the display equipment performs image processing according to a rule corresponding to the segmentation mode to obtain the information of the source image.
At present, when image transmission is performed, the method for segmenting an image includes: SQD (Square Division) and 2SI-2(sample interleave) partitions. However, the current display device cannot determine which segmentation method is adopted for the received image, and can only process the received image by means of selection of a user.
Disclosure of Invention
The embodiment of the invention provides a method for determining an image segmentation mode, a device for determining an image segmentation method, a display method, electronic equipment and a computer readable storage medium.
The embodiment of the invention provides a method for determining an image segmentation mode, which comprises the following steps:
acquiring a plurality of sub-images obtained by image segmentation processing, wherein the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
and determining an image segmentation mode in the image segmentation processing according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity of one sub-image and each of the rest sub-images.
The determining an image segmentation mode in the image segmentation process according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity of one sub-image of the plurality of sub-images and each remaining sub-image comprises:
judging whether a first condition is met;
when the first condition is met, determining the image segmentation mode as a first segmentation mode; when the first condition is not established, judging whether a second condition is established; when the second condition is met, determining the image segmentation mode as a second segmentation mode;
wherein the first condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value; the second condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value;
the first division mode is an equal square division mode, and the second division mode is a two-sample interleaving division mode.
Optionally, the determining, according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image, an image segmentation manner in the image segmentation process includes:
judging whether a first condition is satisfied;
when the first condition is met, determining the image segmentation mode as a first segmentation mode; when the first condition is not satisfied, judging whether a second condition is satisfied; when the second condition is met, determining the image segmentation mode as a second segmentation mode;
wherein the first condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value; the second condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value;
the first division mode is a two-sample interleaving division mode, and the second division mode is an equal square division mode.
Optionally, the determining, according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the multiple sub-images and each remaining sub-image, an image segmentation manner in the image segmentation process includes:
judging whether the jump quantity of the image information of any two adjacent sub-images in the same row at the junction and the jump quantity of the image information of any two adjacent sub-images in the same column at the junction are both smaller than a first threshold value;
and when the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than the first threshold, determining that the image segmentation mode is an equally-divided square segmentation mode.
Optionally, the determining, according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image, an image segmentation manner in the image segmentation process includes:
judging whether the difference between one sub-image and any other sub-image in the plurality of sub-images is smaller than a second threshold value;
and when the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value, determining the image segmentation mode as a two-sampling interleaving segmentation mode.
Optionally, the jump amount of the image information of the two adjacent sub-images at the boundary is calculated according to the following steps:
respectively acquiring pixel information of two groups of pixels from the two adjacent sub-images, wherein each group of pixels comprises: n pixels adjacent to the boundary line of the two adjacent sub-images and arranged along the boundary line; n is a positive integer greater than zero; the pixel information of the pixel comprises components of the primary colors of the pixel;
calculating an image information jump quantity G at the boundary of the two adjacent sub-images according to the following formula:
Figure BDA0002256775710000031
Figure BDA0002256775710000032
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is a component of the jth primary color of the ith pixel in the other set of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color classes in the pixel.
Optionally, the difference between one sub-image of the plurality of sub-images and each of the rest sub-images is calculated according to the following steps:
extracting at least three pairs of image blocks from two sub-images with difference to be calculated, wherein the two image blocks in each pair of image blocks are respectively positioned in the two sub-images with difference to be calculated, and the two image blocks in each pair of image blocks are positioned in the same position and have the same size in the respective sub-images;
determining the difference quantity of two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, wherein the pixel information of the pixels comprises the components of each primary color of the pixels;
and determining the difference of the two sub-images of which the difference is to be calculated according to the difference of the two image blocks in each pair of image blocks.
Optionally, determining a difference amount between two image blocks in each pair of image blocks according to pixel information of each pixel in each image block includes:
for two image blocks in each pair of image blocks,
taking the pixels at the same positions in the two image blocks as pixel pairs;
determining a difference amount of pixel information of two pixels in each pixel pair;
and determining the difference of the two image blocks according to the difference of the pixel information of the two pixels in each pixel pair.
Optionally, the determining a difference amount of pixel information of two pixels in each pixel pair includes:
determining a difference value of the components of each primary color of the two pixels in the pair;
and determining the average value of the difference values of all the primary colors of the two pixels in the pixel pair, and taking the average value as the difference quantity of the pixel information of the two pixels.
Optionally, determining a difference between the two image blocks according to a difference between pixel information of two pixels in each pixel pair includes:
and determining the average value of the difference quantities corresponding to all the pixel pairs, and taking the average value as the difference quantity of the two image blocks.
Optionally, in the step of extracting at least three pairs of image blocks from two sub-images with difference to be calculated, the extracted image blocks are five pairs, and five image blocks extracted from each of the two sub-images with difference to be calculated are respectively located in: the four corners and the center position of each sub-image.
Correspondingly, an embodiment of the present invention further provides an image display method, including:
acquiring a plurality of sub-images obtained by image segmentation processing, wherein the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
determining an image segmentation mode in the image segmentation processing according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity between one sub-image of the plurality of sub-images and each of the rest sub-images;
and determining an image integration mode according to the image segmentation mode, and integrating the plurality of sub-images by adopting the image integration mode to obtain an image to be displayed.
Correspondingly, an embodiment of the present invention further provides an apparatus for determining an image segmentation method, including:
the image acquisition module is used for acquiring a plurality of sub-images obtained by image segmentation processing, and the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
the determining module is used for determining an image segmentation mode in the image segmentation processing according to at least one of the jump quantity of the image information of every two adjacent sub-images at the boundary and the difference quantity of one sub-image in the plurality of sub-images and each rest sub-image.
Accordingly, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, implements the method for determining an image segmentation mode or the method for displaying an image.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for determining an image segmentation mode or the method for displaying an image.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method for determining an image segmentation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of image transmission after a source image is segmented in an SQD mode;
FIG. 3 is a schematic diagram of a 2SI-2 method for transmission after source image segmentation;
fig. 4 is a schematic diagram of a plurality of sub-images obtained by an SQD method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of multiple sub-images obtained in a 2SI-2 manner in accordance with an exemplary embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative implementation manner of step S12 in the embodiment of the present invention;
FIG. 7 is a schematic diagram of another alternative implementation manner of step S12 in the embodiment of the present invention;
FIG. 8 is a schematic diagram of still another alternative implementation manner of step S12 in the embodiment of the present invention;
FIG. 9 is a diagram illustrating an image displaying method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an apparatus for determining an image segmentation method according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another apparatus for determining an image segmentation method according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an apparatus for determining an image segmentation method according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart of a method for determining an image segmentation method according to an embodiment of the present invention, where the method may be performed by an apparatus for determining an image segmentation method, and the apparatus may be implemented by software and/or hardware. As shown in fig. 1, the method for determining the image segmentation method includes:
s11, a plurality of sub-images obtained by the image segmentation processing are acquired, and the plurality of sub-images are arranged in a plurality of rows and a plurality of columns. The plurality of sub-images may be obtained by performing image segmentation on a source image, and the source image may be each frame of image in a video stream transmitted to a display device for display.
The image segmentation method in the image segmentation process may be: an equal Square Division (SQD) scheme or a two-sample interleave Division (2 SI-2) scheme. Fig. 2 is a schematic diagram of image transmission after source images are segmented by an SQD method, and fig. 3 is a schematic diagram of image transmission after source images are segmented by a 2SI-2 method. As shown in fig. 2, the SQD method divides a source image Im0 into a plurality of sub-images Im1 to Im4 in a field font manner, synthesizes data of the plurality of sub-images Im1 to Im4, and transmits the synthesized data to an SDI interface. As shown in fig. 3, the source image Im0 is divided in a 2SI-2 mode according to a pixel spacing mode, pixels with the labels of 1 in the source image Im0 form a sub-image Im1, pixels with the labels of 2 in the source image Im0 form a sub-image Im2, pixels with the labels of 3 in the source image Im0 form a sub-image Im3, pixels with the labels of 4 in the source image Im0 form a sub-image Im4, and data of the sub-images Im 1-Im 4 are synthesized and transmitted to an SDI interface.
It should be understood that the image transmission process is performed in a data stream manner, for example, in fig. 2 and 3, the sub-image Im1 is transmitted in the form of data stream 1 and data stream 2. The image acquired in step S11 is not a visual picture, but a vector or a matrix of the image can be formed.
And S12, determining an image segmentation mode in the image segmentation process according to at least one of the jump quantity of the image information of every two adjacent sub-images at the boundary and the difference quantity of one sub-image and each rest sub-image in the plurality of sub-images.
The adjacent sub-images may be adjacent sub-images in the same row or adjacent sub-images in the same column. The image information of the sub-image may comprise pixel values of at least a part of the pixels.
The jump quantity of the image information of the two adjacent sub-images at the boundary represents the jump degree of the image information at the two sides of the boundary line, and can represent the continuity of the pictures displayed by the two sub-images at the boundary, and the smaller the jump quantity, the higher the continuity of the pictures displayed by the two sub-images at the boundary; the larger the amount of transition, the lower the continuity of the picture displayed by the two sub-images at the boundary.
The difference of the two sub-images is used for representing the degree of dissimilarity of the two sub-images, and the dissimilarity of the two sub-images is inversely related to the similarity of the two sub-images; the larger the difference between the two sub-images is, the smaller the similarity between the two sub-images is; the smaller the difference between the two sub-images, the greater the similarity between the two images.
In step S12, the image segmentation method may be determined according to the transition amount of the image information of each two adjacent sub-images at the boundary; the image segmentation mode can also be determined according to the difference between one sub-image in the plurality of sub-images and each of the rest sub-images; the image segmentation mode can also be determined simultaneously according to the jump amount of the image information of every two adjacent sub-images at the boundary and the difference amount of one sub-image and each of the rest sub-images in the plurality of sub-images.
Fig. 4 is a schematic diagram of a plurality of sub-images obtained by an SQD method in a specific example of the present invention, and fig. 5 is a schematic diagram of a plurality of sub-images obtained by a 2SI-2 method in a specific example of the present invention, and as shown in fig. 4 and 5, the images of the plurality of sub-images Im 0-Im 4 obtained by the SQD method are continuous at the boundary. The multiple sub-images Im 0-Im 4 obtained by adopting the 2SI-2 mode are reduced versions of the source image, and the similarity between different sub-images is high. Therefore, whether the plurality of sub-images Im 0-Im 4 are obtained by the SQD method can be judged according to the jumping amount of the image information of at least two adjacent sub-images at the boundary; according to the difference between different sub-images Im 0-Im 4, whether the plurality of sub-images Im 0-Im 4 are obtained in a 2SI-2 mode can be judged.
In the embodiment of the invention, after a plurality of sub-images are received, the image segmentation mode can be automatically determined according to at least one of the jump quantity of the image information of every two adjacent sub-images at the junction and the difference quantity of one sub-image in the plurality of sub-images and each other sub-image, and then the plurality of sub-images are correspondingly processed to restore and display the source images, so that the user does not need to operate, and the display equipment is more intelligent.
Fig. 6 is a schematic diagram illustrating an alternative implementation manner of step S12 in the embodiment of the present invention, and as shown in fig. 6, step S12 includes:
s121, judging whether the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are smaller than a first threshold value. And if so, determining that the image segmentation mode is an SQD mode. Otherwise, determining that the image segmentation mode is not the SQD mode; in this case, the next determination may be made or the image segmentation method may be directly regarded as the 2SI-2 method.
Wherein, the first threshold value can be set according to actual needs.
In one embodiment, the jump amount of the image information of two adjacent sub-images at the boundary is calculated according to the following steps:
s121a, obtaining pixel information of two groups of pixels from the two adjacent sub-images, respectively, where each group of pixels includes: n pixels adjacent to and arranged along a boundary line of the two sub-images; n is a positive integer greater than zero. The pixel information of a pixel comprises components of the primary colors of the pixel, which optionally comprise red, green and blue.
For two adjacent sub-images in the same row, the pixel information of a group of pixels obtained from each sub-image is: pixel information of a row of pixels adjacent to the boundary line; for two adjacent sub-images in the same column, the pixel information of a group of pixels obtained from each sub-image is: pixel information of a row of pixels adjacent to the boundary line.
S121b, calculating an image information jump amount G at the boundary of two adjacent sub-images according to the following formulas (1) (2):
Figure BDA0002256775710000091
Figure BDA0002256775710000092
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is the component of the jth primary color of the ith pixel in another group of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color types in the pixel. Optionally, s-3. The 1 st primary color is red, the 2 nd primary color is green, and the 3 rd primary color is blue.
Of course, in step S121a, each group of pixels may also include other numbers of pixels, for example, for two adjacent sub-images in the same row, the pixel information of one group of pixels obtained from each sub-image may be: pixel information of two columns of pixels adjacent to the boundary line.
Fig. 7 is a schematic diagram of another alternative implementation manner of step S12 in the embodiment of the present invention, and as shown in fig. 7, step S12 includes:
s122, judging whether the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than a second threshold value; if so, determining the image segmentation mode as a 2SI-2 mode; otherwise, determining that the image segmentation mode is not the 2SI-2 mode.
In one embodiment, the difference between the two sub-images is calculated according to the following steps:
s122a, extracting at least three pairs of image blocks from the two sub-images with difference to be calculated, where two image blocks in each pair of imaging blocks are located in the two sub-images with difference to be calculated, and the two image blocks in each pair of imaging blocks are located in the same position and same size in the respective sub-images. The size of the image block is the number of rows and columns of the pixels.
Optionally, five pairs of image blocks are extracted from two sub-images, the five image blocks extracted from each sub-image are respectively located at four corners (i.e. upper left corner, upper right corner, lower left corner, lower right corner) and a central position of each sub-image, and the area of each image block should be smaller than that of the sub-image. There may be no overlap between image blocks in the same sub-image. For example, the number of rows of pixels in each image block is 1/3 of the number of rows of pixels in the sub-image; the number of columns of pixels in each image block is 1/3 of the number of columns of pixels in the sub-image.
S122b, determining the difference between the two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, wherein the pixel information of the pixel includes the components of each primary color of the pixel.
In an embodiment, the step S122b may specifically include:
for two image blocks in each pair of image blocks, taking pixels at the same position in the two image blocks as a pixel pair; and determining the difference amount of the pixel information of the two pixels in each pixel pair, and determining the difference amount of the two image blocks according to the difference amount of the pixel information of the two pixels in each pixel pair.
The determining the difference between the pixel information of the two pixels in each pixel pair may specifically include: determining a difference value of components of each primary color of two pixels in a pixel pair; an average value of the difference values of all the primary colors of the two pixels in the pixel pair is determined as the difference amount of the pixel information of the two pixels. Specifically, the difference value of the red component, the difference value of the green component, and the difference value of the blue component of the two pixels in the pixel pair are averaged, and the average value is taken as the difference amount of the pixel information of the two pixels.
Determining the difference between the two image blocks according to the difference between the pixel information of the two pixels in each pixel pair may specifically include: and determining the average value of the difference quantities corresponding to all the pixel pairs, and taking the average value as the difference quantity of the two image blocks.
S122c, determining the difference between the two image blocks according to the difference between the pixel information of the two pixels in each pixel pair.
Wherein, the average value of the difference of the two image blocks in each pair of image blocks can be used as the difference of the two sub-images; the maximum difference amount may be used as the difference amount between the two sub-images.
In the embodiment of the present invention, step S12 may also be implemented according to the following manner:
judging whether a first condition is satisfied; when a first condition is met, determining the image segmentation mode as a first segmentation mode; when the first condition is not established, judging whether a second condition is established or not; when a second condition is met, determining the image segmentation mode as a second segmentation mode; when the second condition is not satisfied, error information is generated to indicate that information transmission errors and the like can occur.
Wherein one of the first condition and the second condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value; the other of the first condition and the second condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value. One of the first division method and the second division method is an SQD method, and the other of the first division method and the second division method is a 2SI-2 method.
Specifically, the first condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value. The second condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value. The first segmentation mode is an SQD mode; the second division mode is a 2SI-2 mode. In this case, a specific implementation manner of step S12 is shown in fig. 8.
Fig. 8 is a schematic diagram of still another alternative implementation manner of step S12 in the embodiment of the present invention, and as shown in fig. 8, step S12 may include:
and S123, judging whether the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are smaller than a first threshold value. If yes, the image segmentation method is determined to be the SQD method. Otherwise, step S124 is performed.
S124, judging whether the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than a second threshold value; if so, determining the image segmentation mode as a 2SI-2 mode; otherwise, generating error reporting information.
In another implementation, the first condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value. The second condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value. The first division mode is a 2SI-2 mode, and the second division mode is an SQD mode. In this case, step S12 is: firstly, judging whether the difference between one sub-image and any other sub-image in the plurality of sub-images is smaller than a second threshold value, and if so, determining that the segmentation mode is a 2SI-2 mode; and if the judgment result is negative, judging whether the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold, and if so, determining that the image segmentation mode is the SQD mode.
An embodiment of the present invention further provides an image display method, and fig. 9 is a schematic diagram of the image display method provided in the embodiment of the present invention, and as shown in fig. 9, the image display method includes:
s21, a plurality of sub-images obtained by the image segmentation processing are acquired, and the plurality of sub-images are arranged in a plurality of rows and a plurality of columns.
And S22, determining an image segmentation mode in the image segmentation process according to at least one of the jump quantity of the image information of every two adjacent sub-images at the boundary and the difference quantity of one sub-image and each rest sub-image in the plurality of sub-images.
And S23, determining an image integration mode according to the image segmentation mode, and integrating the plurality of sub-images by adopting the image integration mode to obtain an image to be displayed. The image to be displayed comprises the image information of all the sub-images. The image integration method corresponds to the image segmentation method, for example, when the image segmentation method is an SQD method, the image integration method is specifically to stitch a plurality of sub-images.
Fig. 10 is a schematic structural diagram of an apparatus for determining an image segmentation method according to an embodiment of the present invention, the apparatus is configured to execute a method for determining an image segmentation method according to the foregoing embodiment, and as shown in fig. 10, the apparatus includes: an image acquisition module 10 and a determination module 20.
The image obtaining module 10 is configured to obtain a plurality of sub-images obtained by image segmentation, where the plurality of sub-images are arranged in a plurality of rows and a plurality of columns.
The determining module 20 is configured to determine an image segmentation manner in the image segmentation process according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference between one sub-image of the plurality of sub-images and each remaining sub-image.
Fig. 11 is another schematic structural diagram of the apparatus for determining an image segmentation method according to the embodiment of the present invention, and as shown in fig. 11, the apparatus further includes: a pixel information acquisition module 30 and a transition amount calculation module 40.
The pixel information obtaining module 30 is configured to obtain pixel information of two groups of pixels from the two sub-images, where each group of pixels includes: n pixels adjacent to and arranged along a boundary line of the two sub-images; n is a positive integer greater than zero.
The jump amount calculating module 40 is configured to calculate an image information jump amount G at a boundary between two adjacent sub-images according to the following formulas (1) (2):
Figure BDA0002256775710000131
Figure BDA0002256775710000132
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is the component of the jth primary color of the ith pixel in another group of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color types in the pixel. Optionally, s is 3. The 1 st primary color is red, the 2 nd primary color is green, and the 3 rd primary color is blue.
In one embodiment, the determination module 20 includes: a first judgment unit 21 and a first determination unit 22.
The first judging unit 21 is configured to judge whether a transition amount of image information of any two adjacent sub-images in the same row at a boundary and a transition amount of image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold.
The first determining unit 22 is configured to determine that the image segmentation mode is an equant square segmentation mode when both the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are smaller than the first threshold.
Fig. 12 is a schematic structural diagram of a further apparatus for determining an image segmentation method according to an embodiment of the present invention, and as shown in fig. 12, the apparatus further includes: an image block extraction module 50, a first difference acquisition module 60 and a second difference acquisition module 70.
The image block extraction module 50 is configured to extract at least three pairs of image blocks from two sub-images, where the two paired image blocks are located in the two sub-images respectively, and the two paired image blocks are located in the same position and have the same size in the respective sub-images.
The first difference obtaining module 60 is configured to determine a difference between two image blocks in each pair of image blocks according to pixel information of pixels in each image block.
The second difference obtaining module 70 is configured to determine a difference between two sub-images according to the difference between two image blocks in each pair of image blocks.
In one embodiment, the determination module 20 includes: a second judging unit 23 and a second determining unit 24.
The second judging unit 23 is configured to judge whether the difference between one of the plurality of sub-images and any of the rest of the sub-images is smaller than a second threshold.
The second determining unit 24 is configured to determine that the image segmentation mode is a two-sample interleaving segmentation mode when the second determining unit 23 determines that the difference between one of the sub-images and any of the rest sub-images is smaller than the second threshold.
It should be noted that the apparatus for determining an image segmentation manner may include the pixel value obtaining module 30, the transition amount calculating module 40, the image block extracting module 50, the first difference obtaining module 60, and the second difference obtaining module 70. At this time, the determination module 20 includes the above-described first determination unit 21, first determination unit 22, second determination unit 23, and second determination unit 24.
For the description of the implementation details and the technical effects of the modules and units, reference may be made to the description of the foregoing method embodiments, and details are not described here.
The embodiment of the invention also provides an electronic device, which comprises a memory and a processor, wherein the memory is stored with a computer program, and the computer program is executed by the processor to realize the determination method or the image display method of the touch image segmentation mode in the embodiment.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for determining the touch image segmentation method or the method for displaying an image in the above-described embodiment.
The memory and computer readable storage media described above include, but are not limited to, the following readable media: such as Random Access Memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (eeprom), flash memory, magnetic or optical data storage, registers, magnetic disk or tape, optical storage media such as a Compact Disk (CD) or DVD (digital versatile disk), and other non-transitory media. Examples of processors include, but are not limited to, general purpose processors, Central Processing Units (CPUs), microprocessors, Digital Signal Processors (DSPs), controllers, microcontrollers, state machines, and the like.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A method for determining an image segmentation mode is characterized by comprising the following steps:
acquiring a plurality of sub-images obtained by image segmentation processing, wherein the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
determining an image segmentation mode in the image segmentation processing according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity between one sub-image of the plurality of sub-images and each of the rest sub-images;
wherein the jump amount of the image information of the two adjacent sub-images at the junction is calculated according to the following steps:
respectively acquiring pixel information of two groups of pixels from the two adjacent sub-images, wherein each group of pixels comprises: n pixels adjacent to the boundary line of the two adjacent sub-images and arranged along the boundary line; n is a positive integer greater than zero; the pixel information of the pixel comprises components of the primary colors of the pixel;
calculating an image information jump quantity G at the boundary of the two adjacent sub-images according to the following formula:
Figure FDA0003535149830000011
Figure FDA0003535149830000012
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is a component of the jth primary color of the ith pixel in the other set of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color types in the pixel;
the difference between one sub-image of the plurality of sub-images and each of the rest sub-images is calculated according to the following steps:
extracting at least three pairs of image blocks from two sub-images with difference to be calculated, wherein the two image blocks in each pair of image blocks are respectively positioned in the two sub-images with difference to be calculated, and the two image blocks in each pair of image blocks are positioned in the same position and same size in the respective sub-images;
determining the difference quantity of two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, wherein the pixel information of the pixels comprises the components of each primary color of the pixels;
determining the difference of two sub-images to be calculated according to the difference of two image blocks in each pair of image blocks;
determining the difference between two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, including:
for two image blocks in each pair of image blocks,
taking the pixels at the same positions in the two image blocks as pixel pairs;
determining a difference value of the components of each primary color of the two pixels of the pair;
determining an average value of difference values of all primary colors of two pixels in the pixel pair, and taking the average value as a difference quantity of pixel information of the two pixels;
and determining the average value of the difference quantities corresponding to all the pixel pairs, and taking the average value as the difference quantity of the two image blocks.
2. The method according to claim 1, wherein determining the image segmentation method in the image segmentation process according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image comprises:
judging whether a first condition is satisfied;
when the first condition is met, determining the image segmentation mode as a first segmentation mode; when the first condition is not established, judging whether a second condition is established; when the second condition is met, determining the image segmentation mode as a second segmentation mode;
wherein the first condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value; the second condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than a second threshold value;
the first division mode is an equal square division mode, and the second division mode is a two-sample interleaving division mode.
3. The method according to claim 1, wherein determining the image segmentation method in the image segmentation process according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image comprises:
judging whether a first condition is satisfied;
when the first condition is met, determining the image segmentation mode as a first segmentation mode; when the first condition is not satisfied, judging whether a second condition is satisfied; when the second condition is met, determining the image segmentation mode as a second segmentation mode;
wherein the first condition is: the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than a second threshold value; the second condition is: the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than a first threshold value;
the first division mode is a two-sample interleaving division mode, and the second division mode is an equal square division mode.
4. The method according to claim 1, wherein the determining an image segmentation method in the image segmentation process according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image comprises:
judging whether the jump quantity of the image information of any two adjacent sub-images in the same row at the junction and the jump quantity of the image information of any two adjacent sub-images in the same column at the junction are both smaller than a first threshold value;
and when the jump quantity of the image information of any two adjacent sub-images in the same row at the boundary and the jump quantity of the image information of any two adjacent sub-images in the same column at the boundary are both smaller than the first threshold, determining that the image segmentation mode is an equally-divided square segmentation mode.
5. The method according to claim 1, wherein determining the image segmentation method in the image segmentation process according to at least one of a jump amount of image information of each two adjacent sub-images at a boundary and a difference amount between one sub-image of the plurality of sub-images and each remaining sub-image comprises:
judging whether the difference between one sub-image and any other sub-image in the plurality of sub-images is smaller than a second threshold value;
and when the difference between one sub-image in the plurality of sub-images and any other sub-image is smaller than the second threshold value, determining the image segmentation mode to be a two-sampling interleaving segmentation mode.
6. The method according to any one of claims 1 to 5, wherein in the step of extracting at least three pairs of image blocks from two sub-images whose difference amounts are to be calculated, the extracted image blocks are five pairs, and five image blocks extracted in each of the two sub-images whose difference amounts are to be calculated are located in: the four corners and the center position of each sub-image.
7. An image display method, comprising:
acquiring a plurality of sub-images obtained by image segmentation processing, wherein the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
determining an image segmentation mode in the image segmentation processing according to at least one of a jump quantity of image information of every two adjacent sub-images at a boundary and a difference quantity of one sub-image and each of the rest sub-images;
determining an image integration mode according to the image segmentation mode, and integrating the plurality of sub-images by adopting the image integration mode to obtain an image to be displayed;
wherein the jump amount of the image information of the two adjacent sub-images at the junction is calculated according to the following steps:
respectively acquiring pixel information of two groups of pixels from the two adjacent sub-images, wherein each group of pixels comprises: n pixels adjacent to the boundary line of the two adjacent sub-images and arranged along the boundary line; n is a positive integer greater than zero; the pixel information of the pixel comprises components of the primary colors of the pixel;
calculating an image information jump quantity G at the boundary of the two adjacent sub-images according to the following formula:
Figure FDA0003535149830000051
Figure FDA0003535149830000052
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is the component of the jth primary color of the ith pixel in another group of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color types in the pixel;
the difference between one sub-image of the plurality of sub-images and each of the rest sub-images is calculated according to the following steps:
extracting at least three pairs of image blocks from two sub-images with difference to be calculated, wherein the two image blocks in each pair of image blocks are respectively positioned in the two sub-images with difference to be calculated, and the two image blocks in each pair of image blocks are positioned in the same position and same size in the respective sub-images; the size of the image block is the row number and the column number of the pixels;
determining the difference quantity of two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, wherein the pixel information of the pixels comprises the components of each primary color of the pixels;
determining the difference of two sub-images to be calculated according to the difference of two image blocks in each pair of image blocks;
determining the difference between two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, including:
for two image blocks in each pair of image blocks,
taking the pixels at the same positions in the two image blocks as pixel pairs;
determining a difference value of the components of each primary color of the two pixels in the pair;
determining an average value of difference values of all primary colors of two pixels in the pixel pair, and taking the average value as a difference quantity of pixel information of the two pixels;
and determining the average value of the difference quantities corresponding to all the pixel pairs, and taking the average value as the difference quantity of the two image blocks.
8. An apparatus for determining an image segmentation method, comprising:
the image acquisition module is used for acquiring a plurality of sub-images obtained by image segmentation processing, and the plurality of sub-images are arranged in a plurality of rows and a plurality of columns;
the determining module is used for determining an image segmentation mode in the image segmentation processing according to at least one of the jump quantity of the image information of every two adjacent sub-images at the boundary and the difference quantity of one sub-image in the plurality of sub-images and each rest sub-image;
wherein the jumping amount of the image information of the two adjacent sub-images at the boundary is calculated according to the following steps:
respectively acquiring pixel information of two groups of pixels from the two adjacent sub-images, wherein each group of pixels comprises: n pixels adjacent to the boundary line of the two adjacent sub-images and arranged along the boundary line; n is a positive integer greater than zero; the pixel information of the pixel comprises components of the primary colors of the pixel;
calculating an image information jump quantity G at the boundary of the two adjacent sub-images according to the following formula:
Figure FDA0003535149830000061
Figure FDA0003535149830000062
wherein Gi is a pixel information jump variable of the ith pixel in one group of pixels and the ith pixel in the other group of pixels, i is more than 0 and less than or equal to N, and i is an integer; xij is the component of the jth primary color of the ith pixel in one group of pixels; yij is a component of the jth primary color of the ith pixel in the other set of pixels; s is more than 0 and less than or equal to j, and j is an integer; s is the number of primary color types in the pixel;
the difference between one sub-image of the plurality of sub-images and each of the rest sub-images is calculated according to the following steps:
extracting at least three pairs of image blocks from two sub-images with difference to be calculated, wherein the two image blocks in each pair of image blocks are respectively positioned in the two sub-images with difference to be calculated, and the two image blocks in each pair of image blocks are positioned in the same position and same size in the respective sub-images;
determining the difference quantity of two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, wherein the pixel information of the pixels comprises the components of each primary color of the pixels;
determining the difference of two sub-images to be calculated according to the difference of two image blocks in each pair of image blocks;
determining the difference between two image blocks in each pair of image blocks according to the pixel information of each pixel in each image block, including:
for two image blocks in each pair of image blocks,
taking the pixels at the same positions in the two image blocks as pixel pairs;
determining a difference value of the components of each primary color of the two pixels in the pair;
determining an average value of the difference values of all primary colors of the two pixels in the pixel pair, and taking the average value as the difference quantity of the pixel information of the two pixels;
and determining the average value of the difference quantities corresponding to all the pixel pairs, and taking the average value as the difference quantity of the two image blocks.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the computer program, when executed by the processor, implements the method for determining an image segmentation manner according to any one of claims 1 to 6 or the method for displaying an image according to claim 7.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the method for determining an image segmentation manner according to any one of claims 1 to 6 or the image display method according to claim 7.
CN201911057465.XA 2019-10-31 2019-10-31 Method and device for determining division mode, display method and equipment and storage medium Active CN110782463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911057465.XA CN110782463B (en) 2019-10-31 2019-10-31 Method and device for determining division mode, display method and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911057465.XA CN110782463B (en) 2019-10-31 2019-10-31 Method and device for determining division mode, display method and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110782463A CN110782463A (en) 2020-02-11
CN110782463B true CN110782463B (en) 2022-06-24

Family

ID=69388502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911057465.XA Active CN110782463B (en) 2019-10-31 2019-10-31 Method and device for determining division mode, display method and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110782463B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369514B (en) * 2020-02-28 2024-04-02 京东方科技集团股份有限公司 Image segmentation mode detection method and device and display device
CN114302147A (en) * 2022-01-17 2022-04-08 周毅 Video stream data recording and playing method, system, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567952A (en) * 2010-12-16 2012-07-11 阿里巴巴集团控股有限公司 Image segmentation method and system
CN102622761A (en) * 2012-04-13 2012-08-01 西安电子科技大学 Image segmentation method based on similarity interaction mechanism
CN107452002A (en) * 2016-05-31 2017-12-08 百度在线网络技术(北京)有限公司 A kind of image partition method and device
CN109102514A (en) * 2018-08-16 2018-12-28 广东工业大学 A kind of image partition method, device, equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU746669B2 (en) * 1998-10-02 2002-05-02 Canon Kabushiki Kaisha Method and apparatus for segmenting images
CN104899853B (en) * 2014-03-04 2019-12-06 腾讯科技(深圳)有限公司 Image area dividing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567952A (en) * 2010-12-16 2012-07-11 阿里巴巴集团控股有限公司 Image segmentation method and system
CN102622761A (en) * 2012-04-13 2012-08-01 西安电子科技大学 Image segmentation method based on similarity interaction mechanism
CN107452002A (en) * 2016-05-31 2017-12-08 百度在线网络技术(北京)有限公司 A kind of image partition method and device
CN109102514A (en) * 2018-08-16 2018-12-28 广东工业大学 A kind of image partition method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110782463A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
US8723935B2 (en) Image processing device, computer readable storage medium storing image processing program and image processing method
CN108764039B (en) Neural network, building extraction method of remote sensing image, medium and computing equipment
CN110782463B (en) Method and device for determining division mode, display method and equipment and storage medium
US20220222826A1 (en) Detection method and detection device for image segmentation manner, and display device
CN110675371A (en) Scene switching detection method and device, electronic equipment and storage medium
CN109525786B (en) Video processing method and device, terminal equipment and storage medium
US11074742B2 (en) Image processing apparatus, image processing method, and storage medium
US20200218343A1 (en) Gaze point compensation method and apparatus in display device, and display device
US8948502B2 (en) Image processing method, and image processor
CN106331848B (en) The recognition methods of panoramic video and equipment play video method and equipment
US11386934B2 (en) Method and device for displaying target object
CN111787240B (en) Video generation method, apparatus and computer readable storage medium
JP4659793B2 (en) Image processing apparatus and image processing method
CN111083366B (en) Image processing method, device and system based on data segmentation
US10650488B2 (en) Apparatus, method, and computer program code for producing composite image
CN113781334A (en) Method, device, terminal and storage medium for comparing difference between images based on colors
CN111160340B (en) Moving object detection method and device, storage medium and terminal equipment
US9709874B2 (en) Device and method for image processing used for tracking pursued subject
US8380006B2 (en) System and method for merging separated pixel blocks into an integral image of an object
JP5441737B2 (en) Image processing apparatus, image processing method, and image processing program
CN114745520A (en) Video image processing method and device, equipment and storage medium
CN113313642A (en) Image denoising method and device, storage medium and electronic equipment
CN106303496A (en) Picture format determines method and device, display device
EP2975850A1 (en) Method for correcting motion estimation between at least two frames of a video sequence, corresponding device, computer program and non-transitory computer-readable medium
Yao et al. Image retargeting quality assessment based on aspect ratio similarity of salient region

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