CN110335321B - Color block matching degree evaluation method and system, storage medium and electronic equipment - Google Patents

Color block matching degree evaluation method and system, storage medium and electronic equipment Download PDF

Info

Publication number
CN110335321B
CN110335321B CN201910586303.9A CN201910586303A CN110335321B CN 110335321 B CN110335321 B CN 110335321B CN 201910586303 A CN201910586303 A CN 201910586303A CN 110335321 B CN110335321 B CN 110335321B
Authority
CN
China
Prior art keywords
color
color block
vector
matching degree
value
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
CN201910586303.9A
Other languages
Chinese (zh)
Other versions
CN110335321A (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.)
Shanghai Waigaoqiao Shipbuilding Co Ltd
Original Assignee
Shanghai Waigaoqiao Shipbuilding 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 Shanghai Waigaoqiao Shipbuilding Co Ltd filed Critical Shanghai Waigaoqiao Shipbuilding Co Ltd
Priority to CN201910586303.9A priority Critical patent/CN110335321B/en
Publication of CN110335321A publication Critical patent/CN110335321A/en
Application granted granted Critical
Publication of CN110335321B publication Critical patent/CN110335321B/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/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30156Vehicle coating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Spectrometry And Color Measurement (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, a system, a storage medium and an electronic device for evaluating color block matching degree of a ship cabin, wherein the evaluation method comprises the following steps: acquiring an image of the ship cabin, wherein the image comprises n color blocks; traversing the adjacency relation between each color block and the rest color blocks to obtain a topological adjacency relation vector corresponding to each color block; acquiring a color value corresponding to each color block; respectively calculating individual matching degree vectors of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block; and calculating the overall matching degree of all color blocks of the ship cabin by using the individual matching degree vector and the topological area proportion vector. The technical scheme of the invention can evaluate the matching degree of the color blocks in the cabin in a complex environment, is not limited by the color type of the color blocks, effectively improves the design efficiency of the ship cabin, and is suitable for popularization and application in the field of ship design.

Description

Color block matching degree evaluation method and system, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of ship design, in particular to a method and a system for evaluating color block matching degree of a ship cabin, a storage medium and electronic equipment.
Background
The ocean exploration ship has the advantages of deep and distant operation sea area, long operation duration, heavy scientific research tasks and relatively narrow space, and brings serious negative effects to workers on the ship both physiologically and psychologically. Therefore, in the design of the ocean exploration ship cabin, various technical means are needed to relieve the psychological pressure of workers and guarantee the psychological health of the workers so as to maintain a relatively high operation performance level.
The cabin color design is used as an important link of ocean exploration ship design, and has important significance in relieving personnel psychological pressure and adjusting personnel psychological states. The beautiful cabin color design can effectively relax the mental pressure of operators, arouse the positive emotion of the operators, has small implementation difficulty and low additional cost, and is a feasible way for leading the psychology of the crews.
In the prior art, the evaluation of a color design scheme (namely the evaluation of the matching degree among a plurality of color blocks in a cabin) can be completed only by subjective scoring of experts or users, and the evaluation result has strong subjectivity and uncertainty; in addition, an automatic evaluation mode exists in the prior art, but the automatic evaluation mode can only realize simple evaluation of matching of two color blocks and cannot meet the overall evaluation of a plurality of color blocks in a cabin under a complex color environment.
Based on the above description, there is an urgent need to develop an accurate and reliable method for evaluating the color block matching degree of a ship cabin, which satisfies complex color environments.
Disclosure of Invention
The invention provides a method, a system, a storage medium and an electronic device for evaluating the color block matching degree of a ship cabin, aiming at overcoming the defect that the matching degree of the color block of the ship cabin cannot be evaluated accurately and efficiently in the prior art.
The invention solves the technical problems through the following technical scheme:
an evaluation method of color block matching degree of a ship cabin, comprising the following steps:
acquiring an image of the ship cabin, wherein the image comprises n color blocks, and n is a positive integer greater than 1;
traversing the adjacent relation of each color block and the rest color blocks toObtaining a topological adjacency relation vector corresponding to each color block, wherein the topological adjacency relation vector is
Figure BDA0002114539450000021
If the ith color block is adjacent to the jth color block, then aijIf the ith patch is not adjacent to the jth patch, a is 1ij0; wherein, aii=0,0<i≤n,0<j≤n;
Respectively calculating a proportional value between the area of each color block and the areas of the other color blocks to obtain a topological area proportional vector corresponding to each color block;
acquiring a color value corresponding to each color block, wherein the color value comprises a hue value, a brightness value and a chroma value;
respectively calculating individual matching degree vectors of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block;
and calculating the overall matching degree of all color blocks of the ship cabin by using the individual matching degree vector and the topological area proportion vector.
Preferably, before the obtaining the color value corresponding to each color block, the method further includes: presetting a hue conversion table, wherein the hue conversion table comprises a one-to-one correspondence relationship between hue marks and hue values;
the acquiring the color value corresponding to each color block comprises:
extracting the hue identification, the brightness value and the chroma value of each color block;
and converting the hue identification into the corresponding hue value by using the hue conversion table.
Preferably, the step of calculating the individual matching degree vector of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block comprises:
calculating a hue order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000022
wherein the content of the first and second substances,
Figure BDA0002114539450000023
is the vector of the hue rank order factor,
Figure BDA0002114539450000031
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
and calculating a lightness rank order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000032
wherein the content of the first and second substances,
Figure BDA0002114539450000033
is the vector of luminance rank order factors and,
Figure BDA0002114539450000034
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, viIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
calculating a chroma order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000035
wherein the content of the first and second substances,
Figure BDA0002114539450000036
is the vector of the chroma order factor,
Figure BDA0002114539450000037
calculating a complex factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000038
wherein the content of the first and second substances,
Figure BDA0002114539450000039
for the vector of the complex factors,
Figure BDA00021145394500000310
calculating the individual matching degree vector corresponding to the ith color block according to the hue rank order factor vector, the lightness rank order factor vector, the chroma rank order factor vector, the complexity factor vector and the topological adjacency relation vector, wherein the calculation formula is as follows:
Figure BDA0002114539450000041
wherein the content of the first and second substances,
Figure BDA0002114539450000042
is the individual matching degree vector, m, corresponding to the ith color blockii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
Preferably, the overall matching degree is calculated by using the following formula:
Figure BDA0002114539450000043
wherein z is the overall matching degree,
Figure BDA0002114539450000044
and the topological area proportion vector corresponding to the ith color block.
The invention also provides an evaluation system of the color block matching degree of the ship cabin, which comprises the following steps:
the image acquisition module is used for acquiring an image of the ship cabin, wherein the image comprises n color blocks, and n is a positive integer greater than 1;
an adjacency relation determining module, configured to traverse an adjacency relation between each color block and the rest color blocks to obtain a topological adjacency relation vector corresponding to each color block, where the topological adjacency relation vector is a vector of the topological adjacency relation
Figure BDA0002114539450000045
Figure BDA0002114539450000046
If the ith color block is adjacent to the jth color block, then aijIf the ith patch is not adjacent to the jth patch, a is 1ij0; wherein, aii=0,0<i≤n,0<j≤n;
The area proportion vector determining module is used for respectively calculating the proportion value between the area of each color block and the areas of the other color blocks so as to obtain a topological area proportion vector corresponding to each color block;
the color value acquisition module is used for acquiring a color value corresponding to each color block, and the color value comprises a hue value, a brightness value and a chrominance value;
the individual matching degree calculation module is used for calculating the individual matching degree vector of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block;
and the overall matching degree calculation module is used for calculating the overall matching degree of all color blocks of the ship cabin by utilizing the individual matching degree vector and the topological area proportion vector.
Preferably, the evaluation system further comprises a table setting module, configured to preset a hue conversion table, where the hue conversion table includes a one-to-one correspondence relationship between hue identifiers and hue values;
the color value acquisition module comprises an extraction submodule and a transformation submodule:
the extraction submodule is used for extracting the hue identification, the brightness value and the chroma value of each color block;
the extraction submodule is further used for calling the conversion submodule, and the conversion submodule is used for converting the hue identification into the corresponding hue value by using the hue conversion table.
Preferably, the individual matching degree calculation module includes:
the hue order factor calculation submodule is used for calculating a hue order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure BDA0002114539450000051
wherein the content of the first and second substances,
Figure BDA0002114539450000052
is the vector of the hue rank order factor,
Figure BDA0002114539450000053
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
and the lightness order factor calculation submodule is used for calculating a lightness order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure BDA0002114539450000054
wherein the content of the first and second substances,
Figure BDA0002114539450000055
is the vector of luminance rank order factors and,
Figure BDA0002114539450000061
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, viIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
the chroma order factor calculation submodule is used for calculating the chroma order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure BDA0002114539450000062
wherein the content of the first and second substances,
Figure BDA0002114539450000063
is the vector of the chroma order factor,
Figure BDA0002114539450000064
the complex factor calculation submodule is used for calculating a complex factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure BDA0002114539450000065
wherein the content of the first and second substances,
Figure BDA0002114539450000066
for the vector of the complex factors,
Figure BDA0002114539450000067
a matching submodule, configured to calculate the individual matching degree vector corresponding to the ith color patch according to the hue rank order factor vector, the lightness rank order factor vector, the chroma rank order factor vector, the complexity factor vector, and the topological adjacency relation vector, where the calculation formula is:
Figure BDA0002114539450000068
wherein the content of the first and second substances,
Figure BDA0002114539450000069
is the individual matching degree vector, m, corresponding to the ith color blockii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
Preferably, the overall matching degree calculating module is configured to calculate the overall matching degree by using the following formula:
Figure BDA0002114539450000071
wherein z is the overall matching degree,
Figure BDA0002114539450000072
and the topological area proportion vector corresponding to the ith color block.
The invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the method for evaluating the color block matching degree of the ship cabin when executing the computer program.
The present invention also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the aforementioned method for evaluating a color block matching degree of a ship cabin.
On the basis of the common knowledge in the field, the above preferred conditions can be combined randomly to obtain the preferred embodiments of the invention.
The positive progress effects of the invention are as follows: the method, the system, the storage medium and the electronic device for evaluating the color block matching degree of the ship cabin can evaluate the overall matching degree of a plurality of color blocks in the cabin by extracting the topological adjacency relation vector, the topological area proportion vector and the color value of the color blocks in the cabin. Therefore, the matching degree of the color blocks in the cabin in the complex environment can be evaluated, the method is not limited by the color block color types, the implementation difficulty is low, the execution cost is low, the analysis period is short, the design efficiency of the ship cabin is effectively improved, and the method is suitable for being popularized and used in the field of ship design.
Drawings
Fig. 1 is a flowchart of a method for evaluating a color block matching degree of a ship cabin according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for evaluating a color block matching degree of a ship cabin according to embodiment 2 of the present invention.
Fig. 3 is a block diagram of a system for evaluating a color block matching degree of a ship cabin according to embodiment 3 of the present invention.
Fig. 4 is a block diagram of a system for evaluating a color block matching degree of a ship cabin according to embodiment 4 of the present invention.
Fig. 5 is a block diagram of an electronic device for implementing the method for evaluating the color block matching degree of the ship cabin according to embodiment 5 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides an evaluation method of a color block matching degree of a ship cabin, as shown in fig. 1, the evaluation method may include the following steps:
step S1: acquiring an image of the ship cabin, wherein the image comprises n color blocks, and n is a positive integer greater than 1;
step S2: traversing the adjacency relation between each color block and the rest color blocks to obtain a topological adjacency relation vector corresponding to each color block, wherein the topological adjacency relation vector is
Figure BDA0002114539450000081
Figure BDA0002114539450000082
If the ith color block is adjacent to the jth color block, then aijIf the ith patch is not adjacent to the jth patch, a is 1ij0; wherein, aii=0,0<i≤n,0<j≤n;
Step S3: respectively calculating a proportional value between the area of each color block and the areas of the other color blocks to obtain a topological area proportional vector corresponding to each color block;
step S4: acquiring a color value corresponding to each color block, wherein the color value comprises a hue value, a brightness value and a chroma value;
step S5: respectively calculating individual matching degree vectors of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block;
step S6: and calculating the overall matching degree of all color blocks of the ship cabin by using the individual matching degree vector and the topological area proportion vector.
In this embodiment, the color blocks are specifically arranged on the inner wall of the ship cabin, the shape of the color blocks may be circular or polygonal, and the areas of the color blocks may be the same or different.
In step S2, it is necessary to determine the adjacency relation between each color block and the other color blocks, quantize the adjacency relation, and combine the quantized values into a vector form, where a is a topological adjacency relation vectorijThe quantized value (1 or 0) of the adjacency relation of the ith patch and the jth patch can be represented. Note that since there is no relationship of whether or not a color patch is adjacent to itself, a can be set directlyii=0。
Specifically, when step S3 is executed, the topological area proportion vector corresponding to the ith color block includes n numerical values, and specifically, the topological area proportion vector may be written as
Figure BDA0002114539450000091
Wherein the content of the first and second substances,
Figure BDA0002114539450000092
representing the topological area proportion vector corresponding to the ith color block, bijRepresents the ratio of the area of the jth color block (numerator in the ratio) to the area of the ith color block (denominator in the ratio). It will be understood that biiAnd the ratio value representing the area of the ith color block compared with the area of the ith color block is directly set to be 1 without calculation.
In this embodiment, the calculated overall matching degree between the cabin color blocks may represent the beauty matching level of the color blocks, and the higher the value of the overall matching degree is, the more harmonious the color matching between the color blocks representing the entire cabin is, the more beautiful the overall visual perception is.
In specific application, the method provided by the embodiment can be used for calculating the overall matching degree of color blocks of various commonly used typical cabins in advance, the calculated data is used as a reference value, when a new cabin color layout is designed, the calculated overall matching degree of the color blocks can be compared with the reference value, a new design scheme is modified according to a comparison result, and therefore continuous optimization of the design of the ship cabin is achieved.
The method for evaluating the color block matching degree of the ship cabin provided by this embodiment can evaluate the overall matching degree of the plurality of color blocks in the cabin by extracting the topological adjacency relation vector, the topological area proportion vector and the color values of the color blocks in the cabin. Therefore, the matching degree of the color blocks in the cabin in the complex environment can be evaluated, the method is not limited by the color block color types, the implementation difficulty is low, the execution cost is low, the analysis period is short, the design efficiency of the ship cabin is effectively improved, and the method is suitable for being popularized and used in the field of ship design.
Example 2
The embodiment provides an evaluation method of color block matching degree of a ship cabin, which is a further improvement on the basis of embodiment 1.
In this embodiment, since the brightness value representing the brightness state of each color block and the chroma value representing the chroma state both exist in a numerical form, and the hue identifier representing the hue state of each color block exists in a character form, before calculation, the hue identifier needs to be converted into a hue value in a numerical form.
Based on this, a hue conversion table may be preset before the color value corresponding to each color patch is obtained, where the hue conversion table includes a one-to-one correspondence relationship between hue identifiers and hue values.
Next, the hue identifier, the brightness value, and the chroma value of each color block may be extracted, and the hue identifier is converted into the corresponding hue value by using the hue conversion table.
Preferably, the embodiment can adopt a Munsell (Munsell) color system to design the hue conversion table. In the Munsell (Munsell) color system, hue is a characteristic used primarily to distinguish different colors. This embodiment can select five dominant hues: red, yellow, green, blue, violet, five intermediate colors can also be selected: red yellow, yellow green, green blue, blue violet, and purplish red. The colors are arranged in a ring shape and divided into 100 uniform points (each hue is further divided into 10, and the total number of hues is 100). The hue marks R are defined as red, YR as red yellow, Y as yellow, GY as yellow-green, G as green, BG as green-blue, B as blue, PB as blue-violet, P as violet, RP as magenta, etc. For convenience of calculation, the hue marks can be converted into numerical values, and table 1 shows hue marks mainly related to color patches in the ship cabin and hue values corresponding to the hue marks. In specific application, a curve with the abscissa as the hue mark and the ordinate as the hue value can be fitted according to the parameters in table 1, and for hue marks (for example, 6R) not related in table 1, the hue value corresponding to the hue mark can be found by using an interpolation method in the prior art according to the rule of the curve.
TABLE 1
Figure BDA0002114539450000101
Figure BDA0002114539450000111
It should be noted that the brightness value and the chroma value of each color block are numerical values, and therefore conversion is not required.
Referring to fig. 2, further, the step S5 may include the following steps:
step S51: calculating a hue order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000112
wherein the content of the first and second substances,
Figure BDA0002114539450000113
is the vector of the hue rank order factor,
Figure BDA0002114539450000114
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
step S52: and calculating a lightness rank order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000115
wherein the content of the first and second substances,
Figure BDA0002114539450000116
is the vector of luminance rank order factors and,
Figure BDA0002114539450000121
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, theviIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
step S53: calculating a chroma order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000122
wherein the content of the first and second substances,
Figure BDA0002114539450000123
is the vector of the chroma order factor,
Figure BDA0002114539450000124
step S54: calculating a complex factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure BDA0002114539450000125
wherein the content of the first and second substances,
Figure BDA0002114539450000126
for the vector of the complex factors,
Figure BDA0002114539450000127
step S55: calculating the individual matching degree vector corresponding to the ith color block according to the hue rank order factor vector, the lightness rank order factor vector, the chroma rank order factor vector, the complexity factor vector and the topological adjacency relation vector, wherein the calculation formula is as follows:
Figure BDA0002114539450000128
wherein the content of the first and second substances,
Figure BDA0002114539450000129
is as followsi individual matching degree vectors, m, corresponding to the color blocksii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
In this embodiment, the overall matching degree may be calculated by using the following formula:
Figure BDA0002114539450000131
wherein z is the overall matching degree,
Figure BDA0002114539450000132
and the topological area proportion vector corresponding to the ith color block.
The method for evaluating the color block matching degree of the ship cabin can calculate the overall matching degree of the color block in a quantitative mode, and effectively avoids uncertainty caused by subjective evaluation.
Example 3
Referring to fig. 3, the system 1 for evaluating a color block matching degree of a ship cabin may include:
the image acquisition module 10 is configured to acquire an image of the ship cabin, where the image includes n color blocks, and n is a positive integer greater than 1.
In this embodiment, the color blocks are specifically arranged on the inner wall of the ship cabin, the shapes of the color blocks can be circular or polygonal, and the areas of the color blocks can be the same or different.
An adjacency relation determining module 11, configured to traverse an adjacency relation between each color block and the other color blocks to obtain a topological adjacency relation vector corresponding to each color block, where the topological adjacency relation vector is a vector of the topological adjacency relation
Figure BDA0002114539450000133
If the ith color block is adjacent to the jth color block, then aijIf the ith color block is not adjacent to the jth color block, the method is as followsThen a isij0; wherein, aii=0,0<i≤n,0<j≤n。
When the adjacency determining module 11 runs, it needs to determine the adjacency between each color block and the rest color blocks, quantizes and represents the adjacency, and combines the quantized values into a vector form, where a is in a topological adjacency vectorijThe quantized value (1 or 0) of the adjacency relation of the ith patch and the jth patch can be represented. Note that since there is no relationship of whether a color patch is adjacent to itself, a can be set directlyii=0。
An area proportion vector determining module 12, configured to calculate a proportion value between the area of each color block and the areas of the other color blocks, respectively, so as to obtain a topological area proportion vector corresponding to each color block; the topological area proportion vector corresponding to the ith color block comprises n numerical values, and specifically, the topological area proportion vector can be written as
Figure BDA0002114539450000134
Wherein the content of the first and second substances,
Figure BDA0002114539450000135
representing the topological area proportion vector corresponding to the ith color block, bijRepresents the ratio of the area of the jth color block (numerator in the ratio) to the area of the ith color block (denominator in the ratio). It will be understood that biiAnd the ratio value representing the area of the ith color block compared with the area of the ith color block is directly set to be 1 without calculation.
And a color value obtaining module 13, configured to obtain a color value corresponding to each color block, where the color value includes a hue value, a brightness value, and a chroma value.
And an individual matching degree calculation module 14, configured to calculate an individual matching degree vector of each color block and the other color blocks according to the color value, the topological adjacency relation vector, and the topological area proportion vector corresponding to each color block.
And the overall matching degree calculating module 15 is used for calculating the overall matching degree of all color blocks of the ship cabin by using the individual matching degree vector and the topological area proportion vector.
In this embodiment, the calculated overall matching degree between the cabin color blocks may represent the beauty matching level of the color blocks, and the higher the value of the overall matching degree is, the more harmonious the color matching between the color blocks that identify the entire cabin is, the more beautiful the overall visual perception is.
The evaluation system in embodiment 3 corresponds to the evaluation method in embodiment 1. For more contents of the working principle and the working mode of the evaluation system in embodiment 3, reference may be made to the description about the evaluation method in embodiment 1, and details are not repeated here.
When the system for evaluating the color block matching degree of the ship cabin provided by this embodiment is in operation, the overall matching degree of the plurality of color blocks in the cabin can be evaluated by extracting the topological adjacency relation vector, the topological area proportion vector, and the color value of the color block of the plurality of color blocks in the cabin. Therefore, the matching degree of the color blocks in the cabin in the complex environment can be evaluated, the method is not limited by the color block color types, the implementation difficulty is low, the execution cost is low, the analysis period is short, the design efficiency of the ship cabin is effectively improved, and the method is suitable for being popularized and used in the field of ship design.
Example 4
The present embodiment provides an evaluation system for a color block matching degree of a ship cabin, which is a further improvement on embodiment 3.
Referring to fig. 4, the evaluation system 1 may further include a table setting module 16, configured to preset a hue conversion table, where the hue conversion table includes a one-to-one correspondence relationship between hue marks and hue values.
The color value obtaining module 13 may include an extraction sub-module 131 and a transformation sub-module 132:
the extracting sub-module 131 is configured to extract the hue identifier, the brightness value, and the chroma value of each color block;
the extracting sub-module 131 is further configured to invoke the transforming sub-module 132, and the transforming sub-module 132 is configured to transform the hue identifier into the corresponding hue value by using the hue transformation table.
Further, the individual matching degree calculation module 14 includes:
the hue order factor calculating submodule 141 is configured to calculate a hue order factor vector corresponding to the ith color patch, where the calculation formula is:
Figure BDA0002114539450000151
wherein the content of the first and second substances,
Figure BDA0002114539450000152
is the vector of the hue rank order factor,
Figure BDA0002114539450000153
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
the lightness order factor calculating submodule 142 is configured to calculate a lightness order factor vector corresponding to the ith color block, where the calculation formula is:
Figure BDA0002114539450000154
wherein the content of the first and second substances,
Figure BDA0002114539450000155
is the vector of luminance rank order factors and,
Figure BDA0002114539450000156
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, viIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
the chroma order factor calculating submodule 143 is configured to calculate a chroma order factor vector corresponding to the ith color patch, where the calculation formula is:
Figure BDA0002114539450000161
wherein the content of the first and second substances,
Figure BDA0002114539450000162
is the vector of the chroma order factor,
Figure BDA0002114539450000163
the complexity factor calculating submodule 144 is configured to calculate a complexity factor vector corresponding to the ith color block, where the calculation formula is:
Figure BDA0002114539450000164
wherein the content of the first and second substances,
Figure BDA0002114539450000165
for the vector of the complex factors,
Figure BDA0002114539450000166
the matching sub-module 145 is configured to calculate the individual matching degree vector corresponding to the ith color patch according to the hue order factor vector, the lightness order factor vector, the chroma order factor vector, the complexity factor vector, and the topological adjacency relation vector, and the calculation formula is as follows:
Figure BDA0002114539450000167
wherein the content of the first and second substances,
Figure BDA0002114539450000168
is the individual matching degree vector, m, corresponding to the ith color blockii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
Preferably, the overall matching degree calculating module 15 may calculate the overall matching degree by using the following formula:
Figure BDA0002114539450000169
wherein z is the overall matching degree,
Figure BDA00021145394500001610
and the topological area proportion vector corresponding to the ith color block.
The evaluation system in example 4 corresponds to the evaluation method in example 2. For more contents of the working principle and the working mode of the evaluation system in embodiment 4, reference may be made to the description about the evaluation method in embodiment 2, and details are not repeated here.
When the system for evaluating the matching degree of the color blocks of the ship cabin provided by the embodiment operates, the overall matching degree of the color blocks can be calculated in a quantitative mode, and uncertainty caused by subjective evaluation is effectively avoided.
Example 5
The present invention further provides an electronic device, as shown in fig. 5, the electronic device may include a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor implements the steps of the method for evaluating the color block matching degree of the ship cabin in embodiment 1 or 2 when executing the computer program.
It should be understood that the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of the application of the embodiment of the present invention.
As shown in fig. 5, the electronic device 2 may be embodied in the form of a general purpose computing device, such as: which may be a server device. The components of the electronic device 2 may include, but are not limited to: the at least one processor 3, the at least one memory 4, and a bus 5 connecting the various system components (including the memory 4 and the processor 3).
The bus 5 may include a data bus, an address bus, and a control bus.
The memory 4 may include volatile memory, such as Random Access Memory (RAM)41 and/or cache memory 42, and may further include Read Only Memory (ROM) 43.
The memory 4 may also include a program tool 45 (or utility tool) having a set (at least one) of program modules 44, such program modules 44 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 3 executes various functional applications and data processing, such as the steps of the method for evaluating the color block matching degree of the ship cabin in embodiment 1 or 2 of the present invention, by running the computer program stored in the memory 4.
The electronic device 2 may also communicate with one or more external devices 6, such as a keyboard, pointing device, etc. Such communication may be via an input/output (I/O) interface 7. Also, the model-generated electronic device 2 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network) via the network adapter 8.
As shown in FIG. 5, the network adapter 8 may communicate with other modules of the model-generated electronic device 2 via a bus 5. It will be appreciated by those skilled in the art that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generated electronic device 2, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the method for evaluating the color patch matching degree of a ship cabin in embodiment 1 or 2.
More specific ways in which the computer-readable storage medium may be employed may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product including program code for causing a terminal device to execute the steps of implementing the method for evaluating a color block matching degree of a ship cabin in embodiment 1 or 2 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A method for evaluating the color block matching degree of a ship cabin is characterized by comprising the following steps:
acquiring an image of the ship cabin, wherein the image comprises n color blocks, and n is a positive integer greater than 1;
traversing the adjacency relation between each color block and the rest color blocks to obtain a topological adjacency relation vector corresponding to each color block, wherein the topological adjacency relation vector is
Figure FDA0002943629240000011
If the ith color block is adjacent to the jth color block, then aijIf the ith patch is not adjacent to the jth patch, a is 1ij0; wherein, aii=0,0<i≤n,0<j≤n;
Respectively calculating the ratio of the area of each color block to the areas of the other color blocks to obtain a topological area ratio vector corresponding to each color block, wherein the topological area ratio vector is
Figure FDA0002943629240000012
Figure FDA0002943629240000013
Wherein the content of the first and second substances,
Figure FDA0002943629240000014
representing the topological area proportion vector corresponding to the ith color block, bijRepresenting the ratio value of the area of the jth color block to the area of the ith color block;
acquiring a color value corresponding to each color block, wherein the color value comprises a hue value, a brightness value and a chroma value;
respectively calculating individual matching degree vectors of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block;
and calculating the overall matching degree of all color blocks of the ship cabin by using the individual matching degree vector and the topological area proportion vector.
2. The method for evaluating matching degree of color blocks of a ship cabin according to claim 1,
before the obtaining the color value corresponding to each color block, the method further includes: presetting a hue conversion table, wherein the hue conversion table comprises a one-to-one correspondence relationship between hue marks and hue values;
the acquiring the color value corresponding to each color block comprises:
extracting the hue identification, the brightness value and the chroma value of each color block;
and converting the hue identification into the corresponding hue value by using the hue conversion table.
3. The method for evaluating the matching degree of color blocks of a cabin of a ship of claim 2, wherein the step of calculating the individual matching degree vector of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block comprises:
calculating a hue order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure FDA0002943629240000021
wherein the content of the first and second substances,
Figure FDA0002943629240000022
is the vector of the hue rank order factor,
Figure FDA0002943629240000023
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
and calculating a lightness rank order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure FDA0002943629240000024
wherein the content of the first and second substances,
Figure FDA0002943629240000025
is the vector of luminance rank order factors and,
Figure FDA0002943629240000026
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, viIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
calculating a chroma order factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure FDA0002943629240000027
wherein the content of the first and second substances,
Figure FDA0002943629240000028
is the vector of the chroma order factor,
Figure FDA0002943629240000029
calculating a complex factor vector corresponding to the ith color block, wherein the calculation formula is as follows:
Figure FDA0002943629240000031
wherein the content of the first and second substances,
Figure FDA0002943629240000032
for the vector of the complex factors,
Figure FDA0002943629240000033
calculating the individual matching degree vector corresponding to the ith color block according to the hue rank order factor vector, the lightness rank order factor vector, the chroma rank order factor vector, the complexity factor vector and the topological adjacency relation vector, wherein the calculation formula is as follows:
Figure FDA0002943629240000034
wherein the content of the first and second substances,
Figure FDA0002943629240000035
is the individual matching degree vector, m, corresponding to the ith color blockii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
4. The method for evaluating the matching degree of color blocks of the ship cabin according to claim 3, wherein the overall matching degree is calculated by using the following formula:
Figure FDA0002943629240000036
wherein z is the overall matching degree,
Figure FDA0002943629240000037
and the topological area proportion vector corresponding to the ith color block.
5. An evaluation system of a color block matching degree of a ship cabin, characterized by comprising:
the image acquisition module is used for acquiring an image of the ship cabin, wherein the image comprises n color blocks, and n is a positive integer greater than 1;
an adjacency relation determining module, configured to traverse an adjacency relation between each color block and the rest color blocks to obtain a topological adjacency relation vector corresponding to each color block, where the topological adjacency relation vector is a vector of the topological adjacency relation
Figure FDA0002943629240000038
Figure FDA0002943629240000039
If the ith color block is adjacent to the jth color block, then aijIf the ith patch is not adjacent to the jth patch, a is 1ij0; wherein, aii=0,0<i≤n,0<j≤n;
An area proportion vector determination module, configured to calculate a proportion value between the area of each color block and the areas of the other color blocks, respectively, to obtain a topological area proportion vector corresponding to each color block, where the topological area proportion vector is
Figure FDA0002943629240000041
Wherein the content of the first and second substances,
Figure FDA0002943629240000042
representing the topological area proportion vector corresponding to the ith color block, bijRepresenting the ratio value of the area of the jth color block to the area of the ith color block;
the color value acquisition module is used for acquiring a color value corresponding to each color block, and the color value comprises a hue value, a brightness value and a chrominance value;
the individual matching degree calculation module is used for calculating the individual matching degree vector of each color block and the rest color blocks according to the color value, the topological adjacency relation vector and the topological area proportion vector corresponding to each color block;
and the overall matching degree calculation module is used for calculating the overall matching degree of all color blocks of the ship cabin by utilizing the individual matching degree vector and the topological area proportion vector.
6. The system for evaluating matching degree of color blocks of a ship cabin according to claim 5,
the evaluation system also comprises a table setting module for presetting a hue conversion table, wherein the hue conversion table comprises a one-to-one correspondence relationship between hue marks and hue values;
the color value acquisition module comprises an extraction submodule and a transformation submodule:
the extraction submodule is used for extracting the hue identification, the brightness value and the chroma value of each color block;
the extraction submodule is further used for calling the conversion submodule, and the conversion submodule is used for converting the hue identification into the corresponding hue value by using the hue conversion table.
7. The system for evaluating matching degree of patch for a ship cabin according to claim 6, wherein said individual matching degree calculating module comprises:
the hue order factor calculation submodule is used for calculating a hue order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure FDA0002943629240000043
wherein the content of the first and second substances,
Figure FDA0002943629240000044
is the vector of the hue rank order factor,
Figure FDA0002943629240000051
h isiIs the hue value of the ith color patch, hjIs the hue value of the jth color block;
and the lightness order factor calculation submodule is used for calculating a lightness order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure FDA0002943629240000052
wherein the content of the first and second substances,
Figure FDA0002943629240000053
is the vector of luminance rank order factors and,
Figure FDA0002943629240000054
c is mentionediIs the chroma value of the ith color block, cjIs the chroma value of the jth color block, viIs the lightness value of the ith color block, vjIs the brightness value of the jth color block;
the chroma order factor calculation submodule is used for calculating the chroma order factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure FDA0002943629240000055
wherein the content of the first and second substances,
Figure FDA0002943629240000056
is the vector of the chroma order factor,
Figure FDA0002943629240000057
the complex factor calculation submodule is used for calculating a complex factor vector corresponding to the ith color block, and the calculation formula is as follows:
Figure FDA0002943629240000058
wherein the content of the first and second substances,
Figure FDA0002943629240000059
for the vector of the complex factors,
Figure FDA0002943629240000061
a matching submodule, configured to calculate the individual matching degree vector corresponding to the ith color patch according to the hue rank order factor vector, the lightness rank order factor vector, the chroma rank order factor vector, the complexity factor vector, and the topological adjacency relation vector, where the calculation formula is:
Figure FDA0002943629240000062
wherein the content of the first and second substances,
Figure FDA0002943629240000063
is the individual matching degree vector, m, corresponding to the ith color blockii=0.5,mij=(ohij+ovij+ocij)/cij,mij=mji,mii=0.5。
8. The system for evaluating matching degree of color blocks of a cabin of a ship according to claim 7, wherein the overall matching degree calculating module is configured to calculate the overall matching degree by using the following formula:
Figure FDA0002943629240000064
wherein z is the overall matching degree,
Figure FDA0002943629240000065
and the topological area proportion vector corresponding to the ith color block.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for evaluating matching degree of color blocks of a ship's cabin of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for evaluating a color block matching degree of a ship compartment according to any one of claims 1 to 4.
CN201910586303.9A 2019-07-01 2019-07-01 Color block matching degree evaluation method and system, storage medium and electronic equipment Active CN110335321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910586303.9A CN110335321B (en) 2019-07-01 2019-07-01 Color block matching degree evaluation method and system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910586303.9A CN110335321B (en) 2019-07-01 2019-07-01 Color block matching degree evaluation method and system, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110335321A CN110335321A (en) 2019-10-15
CN110335321B true CN110335321B (en) 2021-04-23

Family

ID=68143039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910586303.9A Active CN110335321B (en) 2019-07-01 2019-07-01 Color block matching degree evaluation method and system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110335321B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861055B (en) * 2022-11-24 2023-12-01 武汉所见科技有限公司 Clothing design layout splicing analysis method based on image recognition processing technology

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425466A (en) * 2012-05-17 2013-12-04 腾讯科技(深圳)有限公司 Color matching processing method and color matching processing device
CN105303587A (en) * 2015-10-10 2016-02-03 安徽工业大学 Automated and intelligent figure color-matching method
EP3018461A1 (en) * 2014-11-07 2016-05-11 3M Innovative Properties Company A method of making a dental restoration
CN108712639A (en) * 2018-05-29 2018-10-26 凌云光技术集团有限责任公司 Image color correction method, apparatus and system
CN109901897A (en) * 2019-01-11 2019-06-18 珠海天燕科技有限公司 A kind of method and apparatus of the color of match views in the application

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7760937B2 (en) * 2007-03-29 2010-07-20 Xerox Corporation Automatic conversion of full color images to highlight color images
CN101996407B (en) * 2010-12-01 2013-02-06 北京航空航天大学 Colour calibration method for multiple cameras
CN102081802A (en) * 2011-01-26 2011-06-01 北京中星微电子有限公司 Method and device for detecting color card based on block matching
CN107833266B (en) * 2017-11-02 2021-01-15 青岛擎鹰信息科技有限责任公司 Holographic image acquisition method based on color block matching and affine correction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425466A (en) * 2012-05-17 2013-12-04 腾讯科技(深圳)有限公司 Color matching processing method and color matching processing device
EP3018461A1 (en) * 2014-11-07 2016-05-11 3M Innovative Properties Company A method of making a dental restoration
CN105303587A (en) * 2015-10-10 2016-02-03 安徽工业大学 Automated and intelligent figure color-matching method
CN108712639A (en) * 2018-05-29 2018-10-26 凌云光技术集团有限责任公司 Image color correction method, apparatus and system
CN109901897A (en) * 2019-01-11 2019-06-18 珠海天燕科技有限公司 A kind of method and apparatus of the color of match views in the application

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Image Inverse Halftone Method of Look-Up Table Based on Color Block Storage;L Huang et al;《Journal of Hunan University of Technology》;20131231;第44-47页 *
基于相对色度匹配方法的专色误差分析模型;盛超等;《海洋测绘》;20101231(第6期);第95-99页 *

Also Published As

Publication number Publication date
CN110335321A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
US8139853B2 (en) Color naming, color categorization and describing color composition of images
US20100110455A1 (en) Language based color selection method
CN102509097B (en) Method and device for image segmentation
Buchsbaum et al. Color categories revealed by non-negative matrix factorization of Munsell color spectra
CN103310201B (en) The recognition methods of target blend color
CN111864896B (en) Power load monitoring method and system
CN1620150A (en) Apparatus and method for controlling the colors of a color image
US20220391693A1 (en) Training transformer neural networks to generate parameters of convolutional neural networks
CN110335321B (en) Color block matching degree evaluation method and system, storage medium and electronic equipment
Ansari et al. Significance of color spaces and their selection for image processing: a survey
CN115830343A (en) Color identification method based on HSV color space
CN107766896A (en) A kind of spectrum dimension reduction method based on form and aspect cluster
US10097731B2 (en) Change degree deriving device, change degree deriving system and known color body
CN112734673B (en) Low-illumination image enhancement method and system based on multi-expression fusion
US11543644B2 (en) Digital imaging device and method for generating a digital color image
Ganesan et al. Automatic segmentation of fruits in CIELuv color space image using hill climbing optimization and fuzzy C-Means clustering
Rasras et al. Developing a new color model for image analysis and processing
CN112560706B (en) Method and device for identifying water body target of multi-source satellite image
US20160247049A1 (en) Monochrome Profile Generation Mechanism
Cao et al. Unsupervised segmentation for color image based on graph theory
KR20020000976A (en) Method for transformating color image on image processing system
US11645790B2 (en) Systems for generating accessible color themes
Kumar et al. Grey level to RGB using YCbCr color space Technique
CN111750995B (en) Spectrum measurement method for open measurement environment application
Guada et al. Comparative assessment of the Image Divide and Link Algorithm in different color spaces

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