Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. How can I find the exact colors of a grayscaled picture?

How can I find the exact colors of a grayscaled picture?

Scheduled Pinned Locked Moved Graphics
questioncsharpalgorithmshelp
10 Posts 3 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JUNEYT
    wrote on last edited by
    #1

    Hello Gentlemen! I am working on a project in vb.net. The application will color any grayscaled picture in its actual colors. The problem is big! All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture. It seems to me that I have to find the color of each pixel first and then what? Is there any matrix about the colors what reflects a paralelism between graysacaled color set to others. Any advise would be helpful.. Thank You! :wtf:

    What a curious mind needs to discover knowledge is noting else than a pin-hole.

    M E 2 Replies Last reply
    0
    • J JUNEYT

      Hello Gentlemen! I am working on a project in vb.net. The application will color any grayscaled picture in its actual colors. The problem is big! All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture. It seems to me that I have to find the color of each pixel first and then what? Is there any matrix about the colors what reflects a paralelism between graysacaled color set to others. Any advise would be helpful.. Thank You! :wtf:

      What a curious mind needs to discover knowledge is noting else than a pin-hole.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      I don't think you can get exact colors from a grayscale image. Have you searched for "colorize algorithm"? Mark

      "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

      1 Reply Last reply
      0
      • J JUNEYT

        Hello Gentlemen! I am working on a project in vb.net. The application will color any grayscaled picture in its actual colors. The problem is big! All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture. It seems to me that I have to find the color of each pixel first and then what? Is there any matrix about the colors what reflects a paralelism between graysacaled color set to others. Any advise would be helpful.. Thank You! :wtf:

        What a curious mind needs to discover knowledge is noting else than a pin-hole.

        E Offline
        E Offline
        El Corazon
        wrote on last edited by
        #3

        JUNEYT wrote:

        All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture.

        there is no way to find the "exact color" of pixel from panchromatic (greyscale). The primary issue is that panchromatic is usually luminance which follows a ration of RGB light there will usually be more than 1 color value triplet to match each pancromatic pixel. you are trying to reverse this formula: RGB Luminance value = 0.3 R + 0.59 G + 0.11 B so if the luminance value is say 255 (bright white luminance) what is the values of R G and B? If you know the most prominant color, a color reference, then you can figure out from the ratios the others involved. Colorizing Panchromatic from low-resolution color reference[^]

        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

        M J 2 Replies Last reply
        0
        • E El Corazon

          JUNEYT wrote:

          All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture.

          there is no way to find the "exact color" of pixel from panchromatic (greyscale). The primary issue is that panchromatic is usually luminance which follows a ration of RGB light there will usually be more than 1 color value triplet to match each pancromatic pixel. you are trying to reverse this formula: RGB Luminance value = 0.3 R + 0.59 G + 0.11 B so if the luminance value is say 255 (bright white luminance) what is the values of R G and B? If you know the most prominant color, a color reference, then you can figure out from the ratios the others involved. Colorizing Panchromatic from low-resolution color reference[^]

          _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Damn! I wanted to read that pdf but it froze while loading :( I'll try later. Thanks for the link! Mark

          "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

          E 1 Reply Last reply
          0
          • E El Corazon

            JUNEYT wrote:

            All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture.

            there is no way to find the "exact color" of pixel from panchromatic (greyscale). The primary issue is that panchromatic is usually luminance which follows a ration of RGB light there will usually be more than 1 color value triplet to match each pancromatic pixel. you are trying to reverse this formula: RGB Luminance value = 0.3 R + 0.59 G + 0.11 B so if the luminance value is say 255 (bright white luminance) what is the values of R G and B? If you know the most prominant color, a color reference, then you can figure out from the ratios the others involved. Colorizing Panchromatic from low-resolution color reference[^]

            _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

            J Offline
            J Offline
            JUNEYT
            wrote on last edited by
            #5

            Thanks you very much Jeffry. I was intending to pull my sleves and jump into coding but when I examined the sophisticated algorithm behind it, I decided to roll back my sleves... :) Thanks a lot! :)

            What a curious mind needs to discover knowledge is noting else than a pin-hole.

            E 1 Reply Last reply
            0
            • J JUNEYT

              Thanks you very much Jeffry. I was intending to pull my sleves and jump into coding but when I examined the sophisticated algorithm behind it, I decided to roll back my sleves... :) Thanks a lot! :)

              What a curious mind needs to discover knowledge is noting else than a pin-hole.

              E Offline
              E Offline
              El Corazon
              wrote on last edited by
              #6

              JUNEYT wrote:

              but when I examined the sophisticated algorithm behind it

              It is the stuff that master's thesises are written about. I know of about four. :) none of them mine, sorry. Though my work was turned into a master's thesis, it just wasn't for me, someone used my work to get theirs. :)

              _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

              1 Reply Last reply
              0
              • M Mark Salsbery

                Damn! I wanted to read that pdf but it froze while loading :( I'll try later. Thanks for the link! Mark

                "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                E Offline
                E Offline
                El Corazon
                wrote on last edited by
                #7

                Mark Salsbery wrote:

                Damn! I wanted to read that pdf but it froze while loading

                http://www.google.com/search?hl=en&q=panchromatic+colorizing[^] there's always fun reading there. If you have my same idea of fun.

                _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                M 1 Reply Last reply
                0
                • E El Corazon

                  Mark Salsbery wrote:

                  Damn! I wanted to read that pdf but it froze while loading

                  http://www.google.com/search?hl=en&q=panchromatic+colorizing[^] there's always fun reading there. If you have my same idea of fun.

                  _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  Gracias! :)

                  "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                  E 1 Reply Last reply
                  0
                  • M Mark Salsbery

                    Gracias! :)

                    "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                    E Offline
                    E Offline
                    El Corazon
                    wrote on last edited by
                    #9

                    You are very welcome. Always willing to encourage the image processing addiction... you'll hate me later. :laugh:

                    _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                    M 1 Reply Last reply
                    0
                    • E El Corazon

                      You are very welcome. Always willing to encourage the image processing addiction... you'll hate me later. :laugh:

                      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                      M Offline
                      M Offline
                      Mark Salsbery
                      wrote on last edited by
                      #10

                      It's way too late. My first computer job that's what I did. The challenge lately has been to not get sucked into it, for the time being :) Hopefully soon I'll have someone to do my UI programming so I can get back to the fun stuff!

                      "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups