Method and system for assigning color to an image, and computer readable storage medium
Through pixel or voxel segmentation and color profile analysis, the image color is automatically allocated, which solves the problem of unclear image and inconspicuous details, realizes quantitative coloring of the image, simplifies the color change process, and improves the visual effect of the image.
Patent Information
- Application Number
- CN202110259564.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2013-09-13
- Filing Date
- 2014-09-10
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2034-09-10
AI Technical Summary
The prior art is difficult to effectively change the color of an image, especially when the image is not clear or the details are not obvious, and the process of changing the color is cumbersome, resulting in the image being unattractive or lacking appeal.
Through pixel or voxel segmentation, the feature points and color profiles in the image are identified, the colors are automatically analyzed and assigned to highlight or blur the details in the image, and quantitative coloring of the image is achieved using color selectors, contour meters and analyzers.
Automatic or manual allocation of image colors is achieved, highlighting or masking details, improving image clarity and attractiveness, and simplifying the color change process.
Smart Images

Figure CN112950747B_ABST
Abstract
Description
[0001] The present invention is a divisional application of the invention patent application with application number 201480050458.6 (international application number: PCT / AU2014 / 000886, application date: September 10, 2014, invention name: method and system for assigning colors to images, computer-readable storage medium). Technical Field
[0002] The present invention relates to a method and apparatus for assigning a pre-selected color to an image or part thereof, such as one or more objects within an image. The term "image" is used herein in its ordinary sense and includes visual representations, such as pictures, maps, and portions of text. Background Art
[0003] For many reasons, a user may wish to alter an image. For example, the image may not have sufficient clarity, and certain details may not be clearly visible, such as due to dullness or poor choice of colors. Furthermore, the image contrast, which is typically related to the entire image, may not be satisfactory to allow clear visualization of details in one or more areas of the image. Currently, zooming in a specific area can be performed, but this does not allow visualization of local quantitative differences between pixels.
[0004] Alternatively, the image may be perceived as unattractive or unappealing. This is often because the user does not like the color of one or more portions of the image, or the color of one or more objects within the image. If the user does not like the color, or when the color does not clearly show the details the user wants to see, it may be difficult or time consuming to change the color of part or all of the image. Summary of the invention
[0005] According to a first broad aspect of the present invention there is provided a computer implemented method of assigning a colour to an image or a portion of said image, the method comprising the steps of:
[0006] segmenting clusters of pixels or voxels by pixels or voxels within the image or a portion of the image; and
[0007] (a) highlighting features in the image or a portion of the image, or (b) blurring or masking details in the image or a portion of the image, wherein (a) highlighting features in the image or a portion of the image or (b) blurring or masking details in the image or a portion of the image comprises:
[0008] Assigning a color to each pixel or voxel in the cluster of pixels or voxels in the image or a portion of the image, wherein segmenting the cluster of pixels or voxels comprises: identifying or selecting at least one pixel or voxel within the image or a portion of the image; creating a reference point (x) corresponding to the at least one pixel or voxel; i ,0) to the pixel or voxel color contour curve of all pixels or voxels in the selected pixel or voxel scheme; detect the reference point (x i ,0); detect the closest point s1 located at the reference point (x i ,0) and the closest point s1; detecting a point p having the same vertical axis value y as the point m and the same horizontal axis value x as the closest point s1; and detecting a minimum distance point n between the point p and the color contour curve, wherein a point k is identified as an inflection point in the portion of the curve between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and the color cluster between the point k belongs visually to color 2 and is located at the reference point (x i ,0) and the cluster of colors between the closest point s1 visually belongs to color 3.
[0009] According to a second broad aspect of the present invention there is provided a system for assigning colour to an image or a portion of said image, the system comprising:
[0010] Color allocator;
[0011] Wherein, the system is configured as follows:
[0012] segmenting clusters of pixels or voxels by pixels or voxels within the image or a portion of the image; and
[0013] (a) highlighting features within the image or a portion of the image, or (b) blurring or masking details in the image or a portion of the image, wherein (a) highlighting features within the image or a portion of the image or (b) blurring or masking details in the image or a portion of the image comprises: using the color assignor to assign a color to each pixel or voxel in the cluster of pixels or voxels in the image or a portion of the image, wherein the system comprises: a color selector, the color selector being configured to identify or select at least one pixel or voxel within the image or a portion of the image; a profilometer, the profilometer being configured to create a reference point (x) corresponding to the at least one pixel or voxel. i ,0) to the pixel or voxel color contour curves of all pixels or voxels in the selected pixel or voxel scheme; and an analyzer, the analyzer is configured to automatically analyze the pixel or voxel color contour curve by the following steps: detecting the reference point (x i ,0), and detects the closest point s1 located at the reference point (x i ,0) and the closest point s1, detecting a point m having a maximum ordinate value y value on the pixel or voxel color contour curve between the point m and the closest point s1, and detecting a point p having the same ordinate value y value as the point m and the same lateral value x value as the closest point s1, and detecting a point n with a minimum distance between the point p and the color contour curve, wherein a point k is identified as an inflection point in the curve portion between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and the color cluster between the point k belongs visually to color 2 and is located at the reference point (x i ,0) and the cluster of colors between the closest point s1 visually belongs to color 3.
[0014] According to a third broad aspect of the invention there is provided a system for assigning colour to a medical or other image or a portion thereof, the system comprising a processor configured to:
[0015] segmenting clusters of pixels or voxels by pixels or voxels within the medical or other image or a portion of the medical or other image; and
[0016] (a) highlighting features within the medical or other image or a portion of the medical or other image, or (b) blurring or masking details within the medical or other image or a portion of the medical or other image, wherein (a) highlighting features within the medical or other image or (b) blurring or masking details within the medical or other image or a portion of the medical or other image comprises: assigning a color to each pixel or voxel in the cluster of pixels or voxels in the medical or other image or a portion of the medical or other image, wherein the processor is further configured to: identify or select at least one pixel or voxel within the medical or other image; create a reference point (x) corresponding to the at least one pixel or voxel; i ,0) to the pixel or voxel color contour curve of all pixels or voxels in the selected pixel or voxel scheme; analyzing the pixel or voxel color contour curve by the following steps: detecting the reference point (x i ,0), and detects the closest point s1 located at the reference point (x i ,0) and the closest point s1, detecting a point m having a maximum ordinate value y value on the pixel or voxel color contour curve between the point m and the closest point s1, and detecting a point p having the same ordinate value y value as the point m and the same lateral value x value as the closest point s1, and detecting a point n with a minimum distance between the point p and the color contour curve, wherein a point k is identified as an inflection point in the curve portion between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and point k belong to color 2 visually and are located at the reference point (x i ,0) and the cluster of colors between point s1 visually belongs to color 3.
[0017] According to a fourth broad aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing a computer program, wherein the computer program includes instructions, and when the instructions are executed on a computing device, the instructions control the device to perform the method according to the first broad aspect of the present invention.
[0018] According to a fifth broad aspect of the present invention there is provided a method of assigning a colour to an image or part thereof, the method comprising:
[0019] selecting a sequence (that is, in a specific order) of colors to be assigned to an image or part thereof (whether automatically or manually);
[0020] Determine the minimum intensity I within an image or part thereof MIN (such as intensity values of pixels or voxels in an image or portion thereof);
[0021] Determine the maximum intensity I within an image or part thereof MAX (such as intensity values of pixels or voxels in an image or portion thereof); and
[0022] The relative intensity value RIV(i) for each pixel or voxel i is determined as follows:
[0023]
[0024] where I(i) is the intensity of pixel or voxel i, and f is a pre-selected function (e.g., a re-arranged normalized value); and
[0025] At least some pixels in the image or portion thereof are assigned colors based on the relative intensity values and the order of each color in the sequence.
[0026] The method may comprise segmenting one or more colors within the image or portion thereof based on a non-threshold analysis of a color contour curve derived from the image or portion thereof.
[0027] The process of assigning colors to an image or one or more portions of an image is called quantitative colorization (QC). While QC can be used to highlight features within an image, it can also be used for the opposite process, that is, to blur or mask any portion of an image or detail in an image. In addition, it can also be used to change colors after these colors have been segmented (i.e., grouped).
[0028] The invention is intended to be used in all fields when images are used, but is particularly useful for medical images (which are by default grayscale), or any other field where clear visualization of details by a scientist or radiologist is crucial.
[0029] In one embodiment, the method comprises selecting a colour or shade in the original image and applying the method only to pixels or voxels of the colour or shade so selected.
[0030] In one embodiment,
[0031] Thus, as a result of this method, a set of RIV values is created that constitutes a colored version of the original image or a portion thereof.
[0032] The method may comprise automatically selecting the image or portion thereof based on one or more criteria.
[0033] The method may include generating a new image by colorizing an original image according to a sequence of colors.
[0034] According to a sixth broad aspect of the invention, there is provided a computer program product comprising instructions which, when executed on a computing device, control the device to perform the method described above. The computer program product may be stored on a computer readable medium (in some cases, in permanent form) or transmitted.
[0035] According to a seventh broad aspect of the present invention there is provided an image produced by the method described above.
[0036] According to an eighth broad aspect of the present invention there is provided a system for assigning colour to an image or part thereof, the system comprising:
[0037] a color selector for selecting a sequence of colors to be assigned to an image or portion thereof (whether automatically or manually);
[0038] An intensity determiner for determining a minimum intensity I within an image or a portion thereof MIN (such as intensity values of pixels or voxels in an image or a portion thereof), and used to determine the maximum intensity I within the image or a portion thereof MAX (such as intensity values of pixels or voxels in an image or portion thereof);
[0039] A relative intensity value determiner for determining a relative intensity value RIV(i) for each pixel or voxel i according to the following formula:
[0040]
[0041] where I(i) is the intensity of pixel or voxel i, and f is a pre-selected function (e.g., a re-arranged normalized value); and
[0042] A color assignor is provided for assigning colors to at least some pixels in the image or portion thereof based on relative intensity values and an order of each color in the sequence.
[0043] In one embodiment, the system includes a color segmenter for segmenting one or more colors within the image or portion thereof based on a non-threshold analysis of a color contour curve derived from the image or portion thereof.
[0044] The system may include automatically selecting the image or portion thereof based on one or more criteria.
[0045] The system may include an image outputter for generating a new image by coloring an original image according to the assigned color.
[0046] According to a ninth broad aspect of the present invention, there is provided a method for segmenting clusters of colors having similar visual appearance, the method comprising:
[0047] selecting one or more colors within the cluster of pixels or colors to be segmented (either automatically or manually);
[0048] determining a color vector direction starting from an initially selected color among the one or more colors;
[0049] creating color profile curves in a plurality of directions starting from an initially selected color of the one or more colors based on a minimum perceptible color difference (a predefined concept related to visual sensitivity); and
[0050] The color contour curve is analyzed to determine which colors in the cluster of colors have substantially the same appearance as the initially selected color (such as by identifying a point in the color contour curve that corresponds to, for example, a minimum or maximum distance between an appropriately selected point and the curve).
[0051] According to this aspect of the invention, there is also provided a system for segmenting clusters of colors having similar visual appearance, the system comprising:
[0052] a color selector for selecting one or more colors within a cluster of pixels or colors to be segmented (either automatically or manually);
[0053] a vector generator for determining a color vector direction starting from an initially selected color of the one or more colors;
[0054] a profilometer for creating color profile curves in a plurality of directions starting from an initially selected color of the one or more colors based on a minimum perceptible color difference (a predefined concept related to visual sensitivity); and
[0055] An analyzer for analyzing the color contour curve to determine which colors in the cluster of colors have substantially the same appearance as the initially selected color (such as by identifying a point in the color contour curve that corresponds to, for example, a minimum or maximum distance between an appropriately selected point and the curve).
[0056] The system may include an output for outputting one or more colors having substantially the same appearance as the initially selected color.
[0057] It should be noted that any of the various individual features of each of the above aspects of the invention, as well as any of the various individual features of the embodiments described herein including in the claims, may be combined where appropriate and desired. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order that the present invention may be more clearly ascertained, embodiments will now be described by way of example with reference to the accompanying drawings, in which:
[0059] Figure 1 is a schematic diagram of a quantitative coloring system according to an embodiment of the present invention;
[0060] Figure 2 yes Figure 1 A schematic diagram of a user interface and controller of a quantitative coloring system;
[0061] Figure 3 yes Figure 1 A flowchart of the operation of the quantitative coloring system;
[0062] Figure 4 Show Figure 1 Operation of the region of interest (ROI) selector of the quantitative coloring system;
[0063] Figure 5 is a flow chart illustrating the automatic segmentation and display of clusters of colors having substantially the same visual appearance as an initially selected color within an image, as determined by Figure 1 The color segmentation of the quantitative colorization system is performed;
[0064] Figure 6 As shown by Figure 1 The color segmenter of the quantitative coloring system selects the colors represented as voxels in space;
[0065] Figure 7 Shown by Figure 1 The quantitative coloring system creates color vectors and color contour curves;
[0066] Figure 8 Show Figure 7 Analysis of color contours within a color vector;
[0067] Fig. 9 Shown with and by Figure 1 A quantitative coloring system selects colors from clusters of colors with similar visual appearance;
[0068] Fig.10 Shown by Figure 1 Additional analysis of the color profile and thereby the color spectrum by a quantitative colorization system to increase the size of the cluster of colors with similar visual appearance to the selected color;
[0069] Fig.11 Show Figure 1 Operation of a relative intensity value (RIV) determiner of a quantitative staining system;
[0070] Fig.12 Show Figure 1 Operation of a color allocator of a quantitative coloring system; and
[0071] Fig.13 Shown by Figure 1 An example of the effect of a change in the RIV performed by a quantitative colorization system associated with the relative importance of image colors selected on the displayed image. DETAILED DESCRIPTION
[0072] According to an embodiment of the present invention, a quantitative colorization system is provided, which is schematically shown in FIG. 1 together with an image source 12 of an original image and an output of the system 10 in the form of a quantitatively colored (QC) image 14. Figure 1 10. Broadly speaking, system 10 receives an original image from an image source 12, determines and assigns an ordered set of selected colors to the original image or to one or more portions thereof, and accordingly outputs an output image 14 having a different color scheme than the original image.
[0073] Image source 12 may include, for example, an image acquisition device, an image creation device, or an image storage device, such as a camera, a scanner, a mobile phone, or a computer. The original image may include a picture, a map, or text, and may be provided to system 10 in any digital format. System 10 may also include image source 12, and thereby also generate an original image for quantitative coloring.
[0074] The system 10 comprises a computing system, typically in the form of a computer, but may be in the form of, for example, a mobile phone or tablet computer provided with suitable hardware and software. The system 10 comprises a user interface including a display 16a and a keyboard 16b, an output in the form of a bus (not shown), and a controller (not shown). The QC image 14 may be output in any suitable manner, such as by displaying to the display 16a, printing or transmitting (via a bus), or storing to a memory (whether the system 10 or otherwise).
[0075] Figure 21 is a schematic diagram of the user interfaces 16a, 16b and controller 18 of the system 10. The controller 18 includes a processor 20 and a memory 22. The processor 20 includes a display controller 24 for controlling the display 16a, an image reader and display 26, a region of interest (ROI) selector 28, a color selector 30, an automatic color segmenter 32, a segmented color display 34, a segmented color modifier 30, a relative intensity value (RIV) determiner 38, a color assigner 40, and a QC image outputter 42. The functions of each of these components are described below.
[0076] Figure 3 yes Figure 1 Flow chart of the operation of the system 10. Each step corresponds to the operation of the image reader and display 26, the region of interest (ROI) selector 28, the color selector 30, the automatic color segmenter 32, the segmented color display 34, the segmented color modifier 36, the relative intensity value (RIV) determiner 38, the color allocator 40 and the QC image outputter 42. Thus, at step 52, the original image is read / input and displayed to the display 16a. At step 54, the user uses the user interface 16b to select one or more regions of interest (ROI) for quantitative coloring. The default setting is to quantitatively color the entire image, and the portion of the image that is to be quantitatively colored based on predefined criteria is selected in the automatic operation system 10 (rather than by the user). In Figure 4 The operation of the region of interest (ROI) selector 28 is further illustrated at 70 in FIG.
[0077] Alternatively, step 54 may be accomplished by image segmentation using a segmentation algorithm that segments specific objects, or any other means for automatically identifying (or segmenting) portions of an image.
[0078] At step 56, the color selector 30 (whether under user control or automatic control) selects the color(s) to be assigned to the image. This selection may be made based on some or all of the colors in the original image or in the selected ROI(s). If under manual control, the color selector 30 controls the system 10 to display a panel from which the user can select the color(s) he or she wants the final QC image 14 to have. If under automatic control, the color selector 30 generates the requested selection based on one or more predefined criteria; for example, the color selector 30 may select a user-specified or predefined number of equally spaced colors from the existing color palette of the original image.
[0079] The order in which the colors are selected also indicates the order in which they should subsequently be assigned from the beginning to the end. Thus, the ordered set of selected colors constitutes a sequence of colors. The color selector 30 is also user controllable by displaying the sequence of colors on the display 16a for user manipulation to subsequently modify the selection of colors or their order in the sequence.
[0080] When the color or colors have been selected, the color segmenter 32 then automatically segments (or classifies) the colors within the original image at step 58. The process of color segmentation is described in detail in the following sections. Figures 5 to 10 , and in broad terms, involves segmenting (multiple) ROIs into multiple separate segments based on color. This is performed because the original image may not contain a simple color palette that easily defines clearly delineated regions. There may be a smooth color gradient from one (e.g., red) pixel to another (e.g., blue) pixel; the segmentation determines where a suitable boundary between these pixels should be located so that two (in this example) regions or image segments can be defined. It should be noted that segmentation may not always be required or desired, where processing would transfer from step 56 to step 64 (see below). In addition, segmentation may be performed at other points in the process, such as before step 56, in which case steps 58 to 62 (discussed below) would precede step 56.
[0081] Thus, reference Figure 5 The color segmentation process of step 58 begins (at 80) by the user selecting a pixel (such as by clicking on a pixel) or a region of pixels (such as by clicking and dragging) containing the color(s) that the user desires to segment. Each pixel of the selected color is identified by the system 10 in a 3D color reference map. In this embodiment, the 3D reference map is RGB (red, green, blue), but may be in any other suitable form, such as HLS (hue, brightness, saturation), HVS (hue, value, saturation), or any other 3D color system.
[0082] Then, the color segmenter 32 creates a series of vectors (J) from the selected color pixels, all of which start from the initial pixel i. The vector (J) represents all directions in the 3D space that can start from pixel i (but for simplicity, only 27 directions are considered in this specification). Then, the color segmenter 32 creates vectors representing all possible colors that can start from pixel i. However, since color is a discreet event, the loss of color in a few pixels may not mean that the color has not been selected by the user; therefore, the concept of color sensitivity (CA) is needed to capture the level of caution that the user may expect when selecting a color. CA allows finer color segmentation in a given direction. However, CA does not exceed the minimum perceptible color difference (MPCD): this is the color difference between pixel i and the farthest pixel (in terms of color), and beyond the farthest pixel, the user can clearly perceive that the pixel has a color different from the color of pixel i. Both CA and MPCD can be adjusted and controlled by the user.
[0083] In each vector, only the distance from pixel i to the MPCD is analyzed by the color segmenter 32. The color segmenter 32 creates a color profile curve and retrieves three or more colors and presents them to the user. If the user confirms the selection of these automatically selected color clusters, the selected colors can then be changed in the image according to the quantitative colorization (QC) method of this embodiment. If the user is not satisfied with any of the automatically selected colors, he or she can adjust the MPCD and CA, or increase the color spectrum, in order to refine the detected color. The user thus eventually finds the color he or she wishes to change.
[0084] Figure 6 Included are schematic diagrams of: (a) an example of a color pixel represented as a voxel in space that represents the color to be segmented, (b) the same voxel with 19 of its 27 neighbors in 3D space, (c) the same pixel or voxel with all of its 27 neighbors, and (d) the location of the pixel or voxel in a 3D color reference.
[0085] The maximum length of the vector (J) is determined by the units in the color system. In a 255*255*255 color system, such as RGB, the maximum diagonal is 441, so the maximum length of (J) is 441. The color segmenter 32 then subdivides the vector (J) into multiple MPCD units, and each MPCD unit is then subdivided into multiple CA units. The default value of MPCD is 20, and the default value of CA is 5. However, these values are adjustable via the user interfaces 16a, 16b. Only contours are analyzed in MPCDs of equal length. If a pixel exists within the image, its value in the vector is set to 1, and if the pixel color does not exist in the image, it is set to 0. The values are then averaged across the length of the CA, and the obtained value is then used as the y value on the color contour curve. The portion of the vector between pixel i and the distance corresponding to the MPCD is subdivided into n consecutive points, where n is the number of CA portions within the MPCD. These n points form the x-axis of the created color contour curve, as shown in FIG. Figure 7 As shown in Figure 7 Creation of a color vector and color contour curve is shown.
[0086] The color contour curve starts at pixel i selected by the user. Figures 8 to 10 , by initially detecting the point (s1) corresponding to the minimum distance between the pixel i corresponding to the coordinate (0,0) and the color contour curve, the curve is analyzed by the color segmenter 32. Point (s1) corresponds to the point where the color selected along the vector has faded significantly. Then, (m) is identified as the point with the maximum y value in the portion of the curve between the pixel i and (s1). Based on (m), this allows the identification of (p) having the same y value as (m) and the x value of (s1). Based on (p), point (n) is identified as the minimum distance between (p) and the color contour curve. Point (n) corresponds to the point where the selected color begins to fade significantly. Finally, point (k) is identified as the inflection point in the portion of the curve between (n) and (s1). Point (k) is the point where the selected color is fading at the highest rate [see WO2011 / 029153].
[0087] These points identify clusters or ranges of colors that visually correspond to the selected color. Those in color 1 visually correspond to the cluster of colors between i and (n). Those in color 2 correspond to the cluster between pixels i and (k). Those in color 3 correspond to the cluster between pixels i and (s) (see Fig.10 ).
[0088] It should be noted that this depiction indicates only three color clusters. In principle, any number of colors can be defined, such as a fourth color between (n) and (k). Fig.10As shown in, it may happen in some cases that the user sees that the identified color does not fully capture the range of the color he or she wishes to select and change. If the color that the user wishes to select actually contains a cluster of colors that extend beyond point (s1), this will happen. The user will then press "add color spectrum". This will trigger a reanalysis of the color profile curve, but this time starting from point (R1) with the same x value as (s1) but with a y value of 0, and identifying (s2), a new color 3 with a cluster corresponding to the color between i and (s2) will be displayed and / or the image will change accordingly. If the user is not satisfied, he or she can trigger "add color spectrum" again, and perform a similar analysis of the curve, but this time starting from s2. It should be noted that the triggering of "add color spectrum" cannot be requested indefinitely. When the curve becomes horizontal relative to the x-axis, and / or the curve has been analyzed along the entire MPCD distance, the minimum distance from a point to the curve will retrieve the same point. When this occurs, the processor warns the user that all colors in the profile that can be associated with the selected color have been identified.
[0089] In each case, the resulting segmented colors (at step 60) are displayed to display 16a via segmented color display 34, thereby informing the user how the colors in the original image will be segmented: one or more colors having substantially the same appearance as the initially selected colors are displayed for user approval.
[0090] At step 62 , the user may enter his or her approval of the segmentation, or if desired, modify the segmentation using the segmentation color modifier 36 .
[0091] At step 64, the RIV determiner 38 sorts all intensity values within the image from minimum intensity to maximum intensity and normalizes the intensity values according to the following equation:
[0092]
[0093] where N(i) is the normalized intensity, I(i) is the intensity of pixel i, and I MAX and I MIN will be assigned colors (see Fig.11 ) in an image (or part thereof). A relative intensity value (RIV(i)) is then calculated from the normalized intensity values, where RIV(i) = f(N(i)). The function f is of any desired and suitable form, such as a linear function, a polynomial function, an exponential function, a logarithmic function or a Gaussian function. The function f is selected so that its behavior in the range N(i) = 0 to 1 is predictable. The function f modifies the normalized intensity values N(i) in a predictable way; it can, for example, amplify or reduce the differences in the normalized intensity values to highlight or reduce the color differences between adjacent pixels so as to make details more or less locally visible.
[0094] Relative intensity values and ordered colors are then associated, as Fig.12 As shown, Fig.12 The operation of the color allocator 40 is shown. A new function g is selected, which may also be of any desired and suitable form, such as a linear function, a polynomial function, an exponential function, a logarithmic function or a Gaussian function. The actual color to be assigned to each pixel is then determined by the color allocator 40 according to the following formula:
[0095]
[0096] Where C(i) is the color of pixel i, RIV(i) is the calculated value of RIV for pixel i, and RIV n is the RIV of color n, and RIV n+1 is the RIV of color n+1. n and C n+1 are colors n and n+1 respectively. As in this example, if the user does not wish to further manipulate the assignment of colors, the function g can be set to:
[0097] As described above, allowing the user to select or modify function f provides a means for changing the relative importance of the selected colors to highlight or suppress details. Fig.13 An example of how this works is shown in Fig.13 The modulation function f used to enhance or de-enhance some features in an image is shown.
[0098] The function f is selected to be an exponential function, such as f=RIV(i) m Changing the value of the index adjusts the relative dominance of the first selected color (ie, low n) to the last selected color (high n), thereby highlighting or toning specific details.
[0099] In this example:
[0100] When the index is m=1, all colors have the same importance.
[0101] As the index m increases to be greater than 1, more of the first selected color dominates the image. That is, features with the first selected color are more prominent in the image.
[0102] The opposite effect occurs when the exponent m decreases and becomes less than 1. The closer m is to 0, the more dominant features with high values of n (especially the last selected color) become.
[0103] Thus, the present invention provides a method and system for automatically (or manually if desired) highlighting specific details in any image using a gradient of color that reflects and amplifies the relative differences in intensity values between pixels or voxels in a selected portion of the image. This thereby allows a clearer visualization of details to be created in specific areas of the image, or in objects within the image, or in the image as a whole.
[0104] Modifications within the scope of the invention may be implemented by those skilled in the art.It will therefore be understood that the invention is not limited to the particular embodiments described by way of example above.
[0105] In the appended claims and in the preceding description of the invention, unless the context requires otherwise due to express language or necessary implication, the word "comprise" or variations thereof are used in an inclusive sense, that is to say specifying the presence of stated features, but not excluding the presence or addition of further features in various embodiments of the invention.
[0106] Furthermore, any reference to prior art herein is not intended to suggest that such prior art forms or constitutes part of the common general knowledge in any country.
Claims
1. A computer-implemented method of assigning a color to an image or a portion of said image, said method comprising the steps of: segmenting clusters of pixels or voxels by pixels or voxels within the image or a portion of the image; as well as (a) highlighting features in the image or a portion of the image, or (b) blurring or masking details in the image or a portion of the image, wherein (a) highlighting features in the image or a portion of the image or (b) blurring or masking details in the image or a portion of the image comprises: assigning a color to each pixel or voxel in said cluster of pixels or voxels in said image or part of said image, Among them, the clusters of segmented pixels or voxels include: identifying or selecting at least one pixel or voxel within the image or a portion of the image; Create a reference point (x) corresponding to the at least one pixel or voxel i ,0) to the pixel or voxel color contour curve of all pixels or voxels in the selected pixel or voxel scheme; Detect the reference point (x i ,0)’s closest point s1; The detection is located at the reference point (x i ,0) and the point m with the maximum y-value on the pixel or voxel color contour curve between the closest point s1; Detecting a point p having the same ordinate value y as the point m and the same abscissa value x as the closest point s1; and Detect the minimum distance point n between the point p and the color contour curve, Wherein, point k is identified as the inflection point in the curve portion between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and the color cluster between the point k belongs visually to color 2 and is located at the reference point (x i ,0) and the cluster of colors between the closest point s1 visually belongs to color 3.
2. The method according to claim 1, wherein: The length of the pixel or voxel color contour curve is a minimum perceptible color difference, and the method includes adjusting the minimum perceptible color difference.
3. The method according to claim 1, further comprising: Another cluster of pixels or voxels is automatically segmented by automatically analyzing another portion of the pixel or voxel color profile curve.
4. The method according to claim 1, further comprising: Another cluster of pixels or voxels is automatically segmented by pixels or voxels within the image or a portion of the image.
5. The method according to claim 1, further comprising: Assign different colors to clusters of segmented pixels or voxels.
6. The method according to claim 5, wherein: Assigning a color to the image or a portion of the image comprises: selecting a sequence of colors for assigning to the image or a portion of the image; Determine the minimum intensity I within the image or a portion of the image MIN ; Determine the maximum intensity I within the image or a portion of the image MAX ;as well as The relative intensity value RIV(i) for each pixel or voxel i is determined according to the following formula: where I(i) is the intensity of pixel or voxel i, and f is a pre-selected function; and At least some pixels or voxels in the image or a portion of the image are assigned a color based on the relative intensity values and an order of each color in the sequence.
7. The method according to claim 6, comprising: (i) selecting a color or darkness in the image or a part of the image and applying the method only to pixels or voxels having the color or darkness so selected; (ii) automatically selecting the image or a part of the image based on one or more criteria; and / or (iii) generating a new image by coloring the image or a part of the image according to the sequence of colors.
8. The method according to claim 6, wherein:
9. A method according to any one of the preceding claims, wherein: The image is a medical image.
10. A system for assigning a color to an image or a portion of the image, the system comprising: Color distributor; Wherein, the system is configured as follows: segmenting clusters of pixels or voxels by pixels or voxels within the image or a portion of the image; and (a) highlighting features within the image or a portion of the image, or (b) blurring or masking details in the image or a portion of the image, wherein (a) highlighting features within the image or a portion of the image or (b) blurring or masking details in the image or a portion of the image comprises: using the color assignor to assign a color to each pixel or voxel in the cluster of pixels or voxels in the image or the portion of the image, Wherein, the system comprises: a color selector configured to identify or select at least one pixel or voxel within the image or a portion of the image; A profiler configured to create a reference point (x) corresponding to the at least one pixel or voxel. i ,0) to the pixel or voxel color contour curves of all pixels or voxels in the selected pixel or voxel scheme; and The analyzer is configured to automatically analyze the pixel or voxel color contour curve by the following steps: detecting the reference point (x i ,0), and detects the closest point s1 located at the reference point (x i ,0) and the closest point s1, detecting a point m having a maximum ordinate value y value on the pixel or voxel color contour curve between the point m and the closest point s1, and detecting a point p having the same ordinate value y value as the point m and the same lateral value x value as the closest point s1, and detecting a point n with a minimum distance between the point p and the color contour curve, wherein a point k is identified as an inflection point in the curve portion between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and the color cluster between the point k belongs visually to color 2 and is located at the reference point (x i ,0) and the cluster of colors between the closest point s1 visually belongs to color 3.
11. The system according to claim 10, wherein: The length of the pixel or voxel color contour curve is the minimum perceptible color difference.
12. The system according to claim 11, wherein: The system enables adjustment of the minimum perceptible color difference.
13. The system according to claim 10, wherein: The system: i) configured to automatically segment another cluster of pixels or voxels by automatically analyzing another portion of the pixel or voxel color profile curve; and / or ii) is configured to assign different colors to clusters of segmented pixels or voxels.
14. The system according to claim 10, wherein: The color selector is further configured to select a sequence of colors for assigning to the image or a portion of the image; and the system further comprises: An intensity determiner for determining a minimum intensity I within the image or a portion of the image MIN , and is used to determine the maximum intensity I within the image or a portion of the image MAX ;as well as A relative intensity value determiner that determines a relative intensity value RIV(i) for each pixel or voxel i according to the following formula: where I(i) is the intensity of pixel or voxel i, and f is a pre-selected function; and A color assignor is provided for assigning a color to at least some pixels or voxels in the image or a portion of the image based on the relative intensity values and an order of each color in the sequence.
15. The system of claim 14, wherein:
16. The system according to any one of claims 10 to 15, wherein: The image is a medical image.
17. A system for assigning a color to a medical or other image or a portion of the medical or other image, the system comprising a processor configured to: segmenting clusters of pixels or voxels by pixels or voxels within the medical or other image or a portion of the medical or other image; and (a) highlighting features within the medical or other image or a portion of the medical or other image, or (b) blurring or masking details within the medical or other image or a portion of the medical or other image, wherein (a) highlighting features within the medical or other image or a portion of the medical or other image, or (b) blurring or masking details within the medical or other image or a portion of the medical or other image comprises: assigning a color to each pixel or voxel in said cluster of pixels or voxels in said medical or other image or a portion of said medical or other image, Wherein, the processor is further configured to: identifying or selecting at least one pixel or voxel within the medical or other image; Create a reference point (x) corresponding to the at least one pixel or voxel i ,0) to the pixel or voxel color contour curve of all pixels or voxels in the selected pixel or voxel scheme; The pixel or voxel color contour curve is analyzed by the following steps: detecting the reference point (x i ,0), and detects the closest point s1 located at the reference point (x i ,0) and the closest point s1, detecting a point m having a maximum ordinate value y value on the pixel or voxel color contour curve between the point m and the closest point s1, and detecting a point p having the same ordinate value y value as the point m and the same lateral value x value as the closest point s1, and detecting a point n with a minimum distance between the point p and the color contour curve, wherein a point k is identified as an inflection point in the curve portion between the minimum distance point n and the closest point s1, located at the reference point (x i ,0) and the minimum distance point n belong to color 1 visually, located at the reference point (x i ,0) and point k belong to color 2 visually and are located at the reference point (x i ,0) and the cluster of colors between point s1 visually belongs to color 3.
18. A non-transitory computer-readable storage medium storing a computer program, the computer program comprising instructions, which, when executed on a computing device, control the device to perform the method of assigning color to an image or a part of the image according to any one of claims 1 to 9.