CN115988186B - Image processing system and method - Google Patents

Image processing system and method Download PDF

Info

Publication number
CN115988186B
CN115988186B CN202310268778.XA CN202310268778A CN115988186B CN 115988186 B CN115988186 B CN 115988186B CN 202310268778 A CN202310268778 A CN 202310268778A CN 115988186 B CN115988186 B CN 115988186B
Authority
CN
China
Prior art keywords
color
grids
grid
blank
colors
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
CN202310268778.XA
Other languages
Chinese (zh)
Other versions
CN115988186A (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.)
Xiamen Kingtop Information Technology Co Ltd
Original Assignee
Xiamen Kingtop 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 Xiamen Kingtop Information Technology Co Ltd filed Critical Xiamen Kingtop Information Technology Co Ltd
Priority to CN202310268778.XA priority Critical patent/CN115988186B/en
Publication of CN115988186A publication Critical patent/CN115988186A/en
Application granted granted Critical
Publication of CN115988186B publication Critical patent/CN115988186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an image processing system and method, comprising a color plate module, a positioning module, a distance measuring module, a mapping module, a grid size setting module and a color filling module, wherein the color module establishes a color gradient color plate containing 16777216 color blocks based on RGB color standards; the positioning module establishes a coordinate system in the image to position the color area; the distance measuring module calculates the maximum linear distance between the pixel elements with the existing colors in the image; the mapping module maps the colors in the ranging module in the color board; dividing all areas of the image into grids by a grid size setting module; the color filling module fills colors into the grid cells, firstly fills the existing color grids which are not fully filled to 100%, secondly takes grids at the original point, grids close to the X axis and grids close to the Y axis as initial grids, supplements blank grids to gradually change colors at 45 degrees on the right, and finally displays a smooth color transition effect in the 45-degree direction of the image.

Description

Image processing system and method
Technical Field
The invention relates to an image processing system and method.
Background
In the image processing work, it is necessary to fill the blank area between different color ranges in the image into gradual color, and a smooth color transition effect is presented in a certain direction.
Disclosure of Invention
Therefore, in order to supplement gradual change colors in a blank area between different color ranges in an image, the invention designs an image processing system and method for realizing smooth and smooth color transition effect in the upper right 45-degree direction.
The technical scheme adopted by the invention is as follows: an image processing system:
the system comprises a color board module, a positioning module, a ranging module, a mapping module, a grid size setting module and a color filling module.
The color board module divides each primary color of red, green and blue into 256-level brightness based on RGB color standards, the brightness is respectively marked as 0, 1, 2, … and 255, three primary colors of different levels of brightness are overlapped and combined to form a color board of 16777216 colors, the color boards are sequentially arranged from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, the color boards are sequentially arranged from bottom to top according to the brightness of 0, 1, 2, … and 255, each color block in the color board is square, and the width of the color block is S.
The positioning module takes the lower left corner of the image as the origin, establishes a plane rectangular coordinate system, takes the horizontal right as the X axis, takes the vertical upward as the Y axis, takes pixel elements as units, marks the coordinate positions of the pixel elements with the existing colors in the image, and sequentially marks the coordinate positions as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n ) For example, the coordinates of the pixel element in the 100 th column from left to right and the 200 th row from bottom to top are (100, 200).
The distance measuring module calculates the maximum linear distance L between the pixel elements with the existing colors in the image, and the calculating steps are as follows:
step 1, calculating the distance R between the pixel element with the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
step 2, screening the maximum value R max Record the pixel position (X m ,Y m );
Step 3, screening the minimum value R min Record the pixel position (X i ,Y i );
Step 4, according to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 The distance L is calculated.
The mapping module locates and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) The color blocks with the same color are positioned, and the straight line distance H between the centers of the two color blocks in the color plate is calculated.
The grid size setting module divides all areas of the image into grids, the shape of each grid unit is square, the width D=L/H×S of each grid unit, the unit of the width D is millimeter, and the numerical value is accurate to the last two decimal places.
The color filling module supplements colors to the grid cells, and comprises the following specific steps:
and 1, filling the color of the existing color grid which is not fully filled to 100%, wherein the filled color is consistent with the color adjacent to the blank area in the grid.
Step 2, searching blank grids among the existing color grids in the upper right 45-degree direction by taking the grid at the original point as an initial grid, recording the colors A and B of the existing color grids at the two ends of the blank grids, and recording the number M of the blank grids among the color A grids and the color B grids; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(1) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(2) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(3) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(4) When one end of the blank grid has no existing color grid, the color of the existing color grid of the end is default to be white.
And step 3, searching blank grids among other existing color grids along the upper right 45-degree direction, wherein the color filling mode is the same as that of the step 2 until all blank grids are filled with color.
And 4, processing grids close to the X axis one by one along the positive direction of the X axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the colors in the same manner as in the step 2 until all blank grids are completely filled with colors.
And 5, processing grids close to the Y axis one by one along the positive direction of the Y axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the colors in the same manner as in the step 2 until all blank grids are completely filled with colors.
An image processing method comprises the following steps:
step 1, dividing each primary color of red, green and blue into 256-level brightness based on RGB color standards, respectively marking the brightness as 0, 1, 2, … and 255, overlapping and combining the three primary colors of different levels of brightness into color plates of 16777216 colors, sequentially arranging the color plates from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, sequentially arranging the color plates from bottom to top according to the brightness of 0, 1, 2, … and 255, wherein each color block in the color plates is square, and the width of the color block is S.
Step 2, using the lower left corner of the image as the origin, establishing a plane rectangular coordinate system, using the horizontal right as the X axis, using the vertical upward as the Y axis, marking the coordinate positions of the pixel elements with the existing colors in the image by using the pixel elements as units, and sequentially marking the coordinate positions as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n ) For example, the coordinates of the pixel element in the 100 th column from left to right and the 200 th row from bottom to top are (100, 200).
Step 3, calculating the maximum linear distance L between the pixel elements with the existing colors in the image, wherein the specific process is as follows:
(1) Calculating the distance R between the pixel element of the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
(2) Screening maximum value R max Record the pixel position (X m ,Y m );
(3) Screening minimum value R min Record the pixel position (X i ,Y i );
(4) According to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 The distance L is calculated.
Step 4, positioning and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) The color blocks with the same color are positioned, and the straight line distance H between the centers of the two color blocks in the color plate is calculated.
And 5, dividing all areas of the image into grids, wherein the grid units are square in shape, the width D=L/H×S of the grid units, the unit of the width D is millimeter, and the numerical value is accurate to the last two decimal places.
And 6, supplementing colors to the grid cells, wherein the concrete flow is as follows:
(1) And (3) filling the color of the existing color grid which is not fully filled to 100%, wherein the filling color is consistent with the color adjacent to the blank area in the grid.
(2) Taking a grid at the original point as an initial grid, searching blank grids among the existing color grids in the upper right 45-degree direction, recording the colors A and B of the existing color grids at the two ends of the blank grids, and recording the number M of the blank grids among the color A grids and the color B grids; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(a) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(b) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(c) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(d) When one end of the blank grid has no existing color grid, the color of the existing color grid of the end is default to be white.
(3) And (3) continuously searching blank grids among other existing color grids along the upper right 45-degree direction, wherein the color filling mode is the same as that of the (2) in the step (6), and until all blank grids are completely filled with color.
(4) And (3) processing grids close to the X axis one by one along the positive direction of the X axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction of the grids, and filling the colors in the same manner as the (2) in the step (6) until all blank grids are filled with colors.
(5) And (3) processing grids close to the Y axis one by one along the positive direction of the Y axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction of the grids, and filling the colors in the same manner as the (2) in the step (6) until all blank grids are completely filled with colors.
Further, the above method and principle are also applicable to color smooth transition processing in other directions.
The image processing system and the method have the following advantages:
(1) The RGB color standard covers all macroscopic color categories, the color categories are combined into a color plate for comparison reference according to a gradual change rule, a reasonable color gradual change reference basis is provided for filling blank areas among different color ranges in an image, and the method is reliable;
(2) Constructing a plane rectangular coordinate system in the image, calculating the linear distance between the farthest colors, and through mapping of the same colors in the color plate, increasing the fineness of the grid to the maximum extent, and increasing the smoothness of the subsequent color gradation, thereby creating a method innovation;
(3) According to the direction of 45 degrees on the right, the mapped gradual change colors in the color plate are supplemented into blank grids in the image, and meanwhile, the scaling of color transformation is carried out, so that the smooth transition of the colors in the image is realized, the characteristic of 45-degree vision difference of a human body is met, and the innovation is strong.
Additional features and advantages of the invention will be set forth in the description which follows, or may be learned by practice of the invention.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, like reference numerals being used to refer to like parts throughout the several views.
FIG. 1 is a schematic diagram of blank grids between existing color grids in the upper right 45 degree direction with the grid at the origin as the starting grid.
FIG. 2 is a schematic diagram of a blank grid between existing color grids in the upper right 45 degree direction with the third column grid immediately adjacent to the X-axis as the starting grid.
FIG. 3 is a schematic diagram of a blank grid between existing color grids in the upper right 45 degree direction with the third row grid next to the Y axis as the starting grid.
Fig. 4 is a flow chart of the method of the present invention.
Reference numerals in the drawings: q1-taking the grid at the origin as a starting grid, wherein blank grids between the color grids exist in the upper right 45-degree direction; q2-is a blank grid between the existing color grids in the upper right 45-degree direction by taking a third grid close to the X axis as a starting grid; q3-is a blank grid between existing color grids in the upper right 45 degree direction with the third row grid next to the Y axis as the starting grid.
Detailed Description
The present invention is described in further detail below with reference to the drawings and examples.
The invention adopts the technical scheme that an image processing system is as follows:
the system comprises a color board module, a positioning module, a ranging module, a mapping module, a grid size setting module and a color filling module.
The color board module divides each primary color of red, green and blue into 256-level brightness based on RGB color standards, the brightness is respectively marked as 0, 1, 2, … and 255, three primary colors of different levels of brightness are overlapped and combined to form a color board of 16777216 colors, the color boards are sequentially arranged from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, the color boards are sequentially arranged from bottom to top according to the brightness of 0, 1, 2, … and 255, each color block in the color board is square, and the width of the color block is S.
The positioning module takes the lower left corner of the image as the origin, establishes a plane rectangular coordinate system, takes the horizontal right as the X axis, takes the vertical upward as the Y axis, takes pixel elements as units, marks the coordinate positions of the pixel elements with the existing colors in the image, and sequentially marks the coordinate positions as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n ) For example, the coordinates of the pixel element in the 100 th column from left to right and the 200 th row from bottom to top are (100, 200).
The distance measuring module calculates the maximum linear distance L between the pixel elements with the existing colors in the image, and the calculating steps are as follows:
step 1, calculating the distance R between the pixel element with the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
step 2, screening the maximum value R max Record the pixel position (X m ,Y m );
Step 3, screening the minimum value R min Record the pixel position (X i ,Y i );
Step 4, according to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 The distance L is calculated.
The mapping module locates and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) The color blocks with the same color are positioned, and the straight line distance H between the centers of the two color blocks in the color plate is calculated.
The grid size setting module divides all areas of the image into grids, the shape of each grid unit is square, the width D=L/H×S of each grid unit, the unit of the width D is millimeter, and the numerical value is accurate to the last two decimal places.
The color filling module supplements colors to the grid cells, and comprises the following specific steps:
and 1, filling the color of the existing color grid which is not fully filled to 100%, wherein the filled color is consistent with the color adjacent to the blank area in the grid.
Step 2, as shown in fig. 1, using the grid at the origin as a starting grid, searching blank grids between the existing color grids in the upper right 45-degree direction, recording the colors A and B of the existing color grids at two ends of the blank grids, and recording the number M of the blank grids between the color A grid and the color B grid; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(1) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(2) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(3) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(4) When one end of the blank grid has no existing color grid, the color of the existing color grid of the end is default to be white.
And step 3, searching blank grids among other existing color grids along the upper right 45-degree direction, wherein the color filling mode is the same as that of the step 2 until all blank grids are filled with color.
And 4, as shown in fig. 2, treating grids close to the X axis one by one along the positive direction of the X axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the color in the same manner as in the step 2 until all blank grids are completely filled with color.
And 5, as shown in fig. 3, treating grids close to the Y axis one by one along the positive direction of the Y axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the color in the same manner as in the step 2 until all blank grids are completely filled with color.
As shown in fig. 4, an image processing method comprises:
step 1, dividing each primary color of red, green and blue into 256-level brightness based on RGB color standards, respectively marking the brightness as 0, 1, 2, … and 255, overlapping and combining the three primary colors of different levels of brightness into color plates of 16777216 colors, sequentially arranging the color plates from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, sequentially arranging the color plates from bottom to top according to the brightness of 0, 1, 2, … and 255, wherein each color block in the color plates is square, and the width of the color block is S.
Step 2, using the lower left corner of the image as the origin, establishing a plane rectangular coordinate system, using the horizontal right as the X axis, using the vertical upward as the Y axis, marking the coordinate positions of the pixel elements with the existing colors in the image by using the pixel elements as units, and sequentially marking the coordinate positions as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n ) For example, the coordinates of the pixel element in the 100 th column from left to right and the 200 th row from bottom to top are (100, 200)。
Step 3, calculating the maximum linear distance L between the pixel elements with the existing colors in the image, wherein the specific process is as follows:
(1) Calculating the distance R between the pixel element of the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
(2) Screening maximum value R max Record the pixel position (X m ,Y m );
(3) Screening minimum value R min Record the pixel position (X i ,Y i );
(4) According to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 The distance L is calculated.
Step 4, positioning and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) The color blocks with the same color are positioned, and the straight line distance H between the centers of the two color blocks in the color plate is calculated.
And 5, dividing all areas of the image into grids, wherein the grid units are square in shape, the width D=L/H×S of the grid units, the unit of the width D is millimeter, and the numerical value is accurate to the last two decimal places.
And 6, supplementing colors to the grid cells, wherein the concrete flow is as follows:
(1) And (3) filling the color of the existing color grid which is not fully filled to 100%, wherein the filling color is consistent with the color adjacent to the blank area in the grid.
(2) As shown in fig. 1, a grid at an origin is taken as a starting grid, blank grids between the existing color grids are searched in the upper right 45-degree direction, the colors A and B of the existing color grids at two ends of the blank grids are recorded, and the number M of the blank grids between the color A grid and the color B grid is recorded; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(a) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(b) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(c) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(d) When one end of the blank grid has no existing color grid, the color of the existing color grid of the end is default to be white.
(3) And (3) continuously searching blank grids among other existing color grids along the upper right 45-degree direction, wherein the color filling mode is the same as that of the (2) in the step (6), and until all blank grids are completely filled with color.
(4) As shown in fig. 2, the grids next to the X axis are processed one by one along the positive direction of the X axis, and are sequentially set as initial grids to fill the blank grids in the upper right 45-degree direction, and the color filling mode is the same as that of the (2) in the step 6 until all the blank grids are filled with color.
(5) As shown in fig. 3, the grids next to the Y axis are processed one by one along the positive direction of the Y axis, and are sequentially set as initial grids to fill the blank grids in the upper right 45-degree direction, and the color filling mode is the same as that of the (2) in the step 6 until all the blank grids are filled with color.
The method and the principle for processing the upper right 45-degree direction of the image into the color smooth transition effect are also applicable to color smooth transition processing in other directions.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention.

Claims (2)

1. An image processing system, characterized in that:
the system comprises a color board module, a positioning module, a ranging module, a mapping module, a grid size setting module and a color filling module;
the color board module divides each primary color of red, green and blue into 256-level brightness based on RGB color standards, the brightness is respectively marked as 0, 1, 2, … and 255, three primary colors of different levels of brightness are overlapped and combined into color boards of 16777216 colors, the color boards are sequentially arranged from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, the color boards are sequentially arranged from bottom to top according to the brightness of 0, 1, 2, … and 255, each color block in the color board is square, and the width of the color block is S;
the positioning module takes the lower left corner of the image as the origin, establishes a plane rectangular coordinate system, takes the horizontal right as the X axis, takes the vertical upward as the Y axis, takes pixel elements as units, marks the coordinate positions of the pixel elements with the existing colors in the image, and sequentially marks the coordinate positions as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n );
The distance measuring module calculates the maximum linear distance L between the pixel elements with the existing colors in the image, and the calculating steps are as follows:
step 1, calculating the distance R between the pixel element with the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
step 2, screening the maximum value R max Record the pixel position (X m ,Y m );
Step 3, screening the minimum value R min RecordingRecording the pixel position (X) i ,Y i );
Step 4, according to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 Calculating a distance L;
the mapping module locates and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) Calculating the straight line distance H between the centers of the color patches at the same color in the color plate;
the grid size setting module divides all areas of the image into grids, the shape of each grid unit is square, the width D=L/H×S of each grid unit, the unit of the width D is millimeter, and the numerical value is accurate to two positions behind a decimal point;
the color filling module supplements colors to the grid cells, and comprises the following specific steps:
step 1, filling the color of the existing color grid which is not fully filled to 100%, wherein the filled color is consistent with the color adjacent to the blank area in the grid;
step 2, searching blank grids among the existing color grids in the upper right 45-degree direction by taking the grid at the original point as an initial grid, recording the colors A and B of the existing color grids at the two ends of the blank grids, and recording the number M of the blank grids among the color A grids and the color B grids; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(1) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(2) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(3) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(4) When one end of the blank grid does not have the existing color grid, defaulting to the fact that the color of the existing color grid at the end is white;
step 3, searching blank grids among other existing color grids along the upper right 45-degree direction continuously, wherein the color filling mode is the same as that of the step 2 until all blank grids are filled with colors;
step 4, processing grids close to the X axis one by one along the positive direction of the X axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the colors in the same manner as in step 2 until all blank grids are completely filled with colors;
and 5, processing grids close to the Y axis one by one along the positive direction of the Y axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction, and filling the colors in the same manner as in the step 2 until all blank grids are completely filled with colors.
2. An image processing method is characterized in that:
step 1, dividing each primary color of red, green and blue into 256-level brightness based on RGB color standards, wherein the brightness is respectively marked as 0, 1, 2, … and 255, three primary colors of different levels of brightness are overlapped and combined into color plates of 16777216 colors, the color plates are sequentially arranged from left to right according to the sequence of red, orange, yellow, green, cyan, blue and purple, the color plates are sequentially arranged from bottom to top according to the brightness of 0, 1, 2, … and 255, each color block in the color plates is square, and the width of the color block is S;
step 2, taking the lower left corner of the image as an origin, and establishing a flatIn the rectangular plane coordinate system, the horizontal right direction is the X axis, the vertical upward direction is the Y axis, and the coordinate positions of the pixels with the colors in the image are marked by taking the pixels as units, and are sequentially marked as (X 1 ,Y 1 )、(X 2 ,Y 2 )、…、(X n ,Y n );
Step 3, calculating the maximum linear distance L between the pixel elements with the existing colors in the image, wherein the specific process is as follows:
(1) Calculating the distance R between the pixel element of the existing color and the origin, and according to R 2 =X n 2 +Y n 2 Solving R;
(2) Screening maximum value R max Record the pixel position (X m ,Y m );
(3) Screening minimum value R min Record the pixel position (X i ,Y i );
(4) According to L 2 =(X m -X i ) 2 +(Y m -Y i ) 2 Calculating a distance L;
step 4, positioning and (X) in the color plate m ,Y m ) Color blocks of the same color are positioned, and then positioned and (X) i ,Y i ) Calculating the straight line distance H between the centers of the color patches at the same color in the color plate;
step 5, dividing all areas of the image into grids, wherein the grid units are square in shape, the width D=L/H×S of the grid units, the unit of the width D is millimeter, and the numerical value is accurate to two positions after decimal point;
and 6, supplementing colors to the grid cells, wherein the concrete flow is as follows:
(1) Filling the color of the existing color grid which is not fully filled to 100%, wherein the filled color is consistent with the adjacent color of the blank area in the grid;
(2) Taking a grid at the original point as an initial grid, searching blank grids among the existing color grids in the upper right 45-degree direction, recording the colors A and B of the existing color grids at the two ends of the blank grids, and recording the number M of the blank grids among the color A grids and the color B grids; calculating the number N of color patches between the color A color patches and the color B color patches in the color board; the blank grid between the color a grid and the color B grid is color filled in the following manner:
(a) When M/n=1, filling the colors of color blocks between the color a color block and the color B color block in the color board into blank grids between the color a grid and the color B grid in sequence according to the direction from a to B;
(b) When M/N is more than 1, filling the colors of color blocks between a color block A and a color block B in the color plate into blank grids between a color block A grid and a color block B grid in sequence according to the direction from A to B, supplementing (M/N) blank grids by each color block color, and adding 1 to the second position after the decimal point as long as a value is arranged in the third position after the decimal point when the (M/N) is a non-integer number, wherein the value is accurate to the two positions after the decimal point until the blank grids are completely filled;
(c) When M/N is less than 1, filling the colors of color blocks between the color A color block and the color B color block in the color board into blank grids between the color A grid and the color B grid in sequence according to the direction from A to B, filling (N/M) colors in each blank grid, subtracting 1 from the second position after the decimal point as long as a numerical value is arranged in the third position after the decimal point when (N/M) is a non-integer, and accurately obtaining the numerical value to the two positions after the decimal point until the blank grids are completely filled;
(d) When one end of the blank grid does not have the existing color grid, defaulting to the fact that the color of the existing color grid at the end is white;
(3) Continuously searching blank grids among other existing color grids along the upper right 45-degree direction, wherein the color filling mode is the same as that of the (2) in the step 6 until all blank grids are completely filled with colors;
(4) Along the positive direction of the X axis, grids close to the X axis are processed one by one, the grids are sequentially set as initial grids, blank grids in the upper right 45-degree direction are filled, and the color filling mode is the same as that of the (2) in the step 6 until all blank grids are filled with color;
(5) And (3) processing grids close to the Y axis one by one along the positive direction of the Y axis, sequentially setting the grids as initial grids, filling blank grids in the upper right 45-degree direction of the grids, and filling the colors in the same manner as the (2) in the step (6) until all blank grids are completely filled with colors.
CN202310268778.XA 2023-03-20 2023-03-20 Image processing system and method Active CN115988186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310268778.XA CN115988186B (en) 2023-03-20 2023-03-20 Image processing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310268778.XA CN115988186B (en) 2023-03-20 2023-03-20 Image processing system and method

Publications (2)

Publication Number Publication Date
CN115988186A CN115988186A (en) 2023-04-18
CN115988186B true CN115988186B (en) 2023-06-09

Family

ID=85961110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310268778.XA Active CN115988186B (en) 2023-03-20 2023-03-20 Image processing system and method

Country Status (1)

Country Link
CN (1) CN115988186B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006248168A (en) * 2005-03-14 2006-09-21 Seiko Epson Corp Color chart, color chart creating device, color chart creating method, and color chart creating program
DE102006021442A1 (en) * 2006-05-09 2007-11-15 Thomas Baloui Color point detecting or emitting and quadratic image grid generating or calculating method, involves aligning color grid and image grid with another color grid and image grid by rotation, shearing and parallel stretching of former grids
CN102937896A (en) * 2012-11-05 2013-02-20 清华大学 Method for dynamically presenting two-dimensional spatial data by using color mapping technology in scalable vector graphics (SVG)
CN103440632A (en) * 2013-09-04 2013-12-11 中测新图(北京)遥感技术有限责任公司 Processing method for improving color fidelity of close-shot large-format images
TW201401229A (en) * 2012-06-28 2014-01-01 Imec Taiwan Co Imaging system and method
CN112308773A (en) * 2020-08-19 2021-02-02 贵州电网有限责任公司 Unmanned aerial vehicle aerial image nondestructive amplification and splicing fusion method
CN115157654A (en) * 2022-07-28 2022-10-11 河北工业大学 Surface color inward diffusion method of color 3D model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080158246A1 (en) * 2007-01-03 2008-07-03 Tvia, Inc. Digital color management method and system
JP6950513B2 (en) * 2017-12-19 2021-10-13 セイコーエプソン株式会社 Color conversion table adjustment method, color conversion table adjustment program, color conversion table adjustment device, and color conversion table adjustment system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006248168A (en) * 2005-03-14 2006-09-21 Seiko Epson Corp Color chart, color chart creating device, color chart creating method, and color chart creating program
DE102006021442A1 (en) * 2006-05-09 2007-11-15 Thomas Baloui Color point detecting or emitting and quadratic image grid generating or calculating method, involves aligning color grid and image grid with another color grid and image grid by rotation, shearing and parallel stretching of former grids
TW201401229A (en) * 2012-06-28 2014-01-01 Imec Taiwan Co Imaging system and method
CN102937896A (en) * 2012-11-05 2013-02-20 清华大学 Method for dynamically presenting two-dimensional spatial data by using color mapping technology in scalable vector graphics (SVG)
CN103440632A (en) * 2013-09-04 2013-12-11 中测新图(北京)遥感技术有限责任公司 Processing method for improving color fidelity of close-shot large-format images
CN112308773A (en) * 2020-08-19 2021-02-02 贵州电网有限责任公司 Unmanned aerial vehicle aerial image nondestructive amplification and splicing fusion method
CN115157654A (en) * 2022-07-28 2022-10-11 河北工业大学 Surface color inward diffusion method of color 3D model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAPGIS二次开发平台下GRD网格法实现渐变色填充剖平图;廖桂香;李振辉;;物探化探计算技术(02);全文 *
一种利用MapGIS绘制海岸带地球化学色斑图的方法;毕世普,孔祥淮,别君;地理空间信息;第13卷(第6期);全文 *

Also Published As

Publication number Publication date
CN115988186A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN103886809B (en) Display packing and display device
CN104821157B (en) Show correction system
CN103745684B (en) Pel array, present image method on display and display
US10791249B2 (en) Color gamut mapping method and color gamut mapping apparatus
CN107863081A (en) Multiple bases conversion method and its converter, display control method, display device
CN101593349B (en) Method for converting two-dimensional image into three-dimensional image
CN204463787U (en) LED structure, display unit and display control unit
CN101895770B (en) Uniformity correcting method for separating brightness and chromaticity of LED display screen
CN104618703B (en) A kind of white balance adjustment method
KR102351725B1 (en) Color gamut mapping method and color gamut mapping device
CN101489143B (en) Image processing method, image data conversion method and apparatus thereof
CN104461440A (en) Rendering method, rendering device and display device
CN107863083A (en) The driving method and drive device of a kind of display device
CN107863084A (en) The driving method and drive device of a kind of display device
CN103928011A (en) Image display method and system
CN107316609A (en) A kind of color-complementing method of WOLED display devices, WOLED display devices
CN104461441A (en) Rendering method, rendering device and display device
CN115988186B (en) Image processing system and method
US10923079B2 (en) Dual-cell display apparatus
US8520939B2 (en) Apparatus and method of reproducing preferred color
CN108320311B (en) AR sand table calibration model calculation method capable of automatically correcting deviation
CN101409770B (en) Method and apparatus for determining two-dimension Lab color range map contour
CN106504203A (en) A kind of Block- matching image repair method of application screening strategy
US9437144B2 (en) Liquid crystal display panel, image displaying method and image displaying system
CN110189667A (en) A kind of display verification method

Legal Events

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