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. C / C++ / MFC
  4. image to matrix

image to matrix

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
8 Posts 4 Posters 0 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.
  • C Offline
    C Offline
    chethan karupakala
    wrote on last edited by
    #1

    i am using visual c++ 2005 in my project,i am stuck in one step i.e., converting any image given to matrix, this matrix is very essential for the futher processing my project, can any one please help in telling me how to convert the given image to matrix

    J C 2 Replies Last reply
    0
    • C chethan karupakala

      i am using visual c++ 2005 in my project,i am stuck in one step i.e., converting any image given to matrix, this matrix is very essential for the futher processing my project, can any one please help in telling me how to convert the given image to matrix

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      You have to be way more specific. How is your image stored? How are you reading it in? John

      C 1 Reply Last reply
      0
      • C chethan karupakala

        i am using visual c++ 2005 in my project,i am stuck in one step i.e., converting any image given to matrix, this matrix is very essential for the futher processing my project, can any one please help in telling me how to convert the given image to matrix

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        what do you mean by "matrix" ? Cleek | Image Toolkits | Thumbnail maker

        C 1 Reply Last reply
        0
        • J John M Drescher

          You have to be way more specific. How is your image stored? How are you reading it in? John

          C Offline
          C Offline
          chethan karupakala
          wrote on last edited by
          #4

          to be more specific here matrix means a two dimensional array of interger, here we have to find the intensity of each pixel and store then int he array for example consider an image with resoultion 5x5 if the intesity of 0x0 pixel is 10 and 0x1 pixel is 20 then the matrix will be 10 20 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. and so on

          1 Reply Last reply
          0
          • C Chris Losinger

            what do you mean by "matrix" ? Cleek | Image Toolkits | Thumbnail maker

            C Offline
            C Offline
            chethan karupakala
            wrote on last edited by
            #5

            thank u for the participation in solving the problem sir, to be more specific here matrix means a two dimensional array of interger, here we have to find the intensity of each pixel and store then in the array for example consider an image with resoultion 5x5 if the intesity of 0x0 pixel is 10 and 0x1 pixel is 20 then the matrix will be 10 20 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. and so on and one more thing is, i am not able to find a function in visual c++ 2005 to get the intensity of the pixel, for example C-language provides getpixel function, in vc++ this function is there but it operates only on bitmap files but i need to find intensity of the pixel even to jpg, and other forms of the image file

            C 1 Reply Last reply
            0
            • C chethan karupakala

              thank u for the participation in solving the problem sir, to be more specific here matrix means a two dimensional array of interger, here we have to find the intensity of each pixel and store then in the array for example consider an image with resoultion 5x5 if the intesity of 0x0 pixel is 10 and 0x1 pixel is 20 then the matrix will be 10 20 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. and so on and one more thing is, i am not able to find a function in visual c++ 2005 to get the intensity of the pixel, for example C-language provides getpixel function, in vc++ this function is there but it operates only on bitmap files but i need to find intensity of the pixel even to jpg, and other forms of the image file

              C Offline
              C Offline
              Chris Losinger
              wrote on last edited by
              #6

              this is a really big task. i recommend you look into something like GDI+, or a toolkit like CIXImage (here on CodeProject), or even a commercial product (for example, the one at the bottom of this post). if you want to be able to read any kind of image file into a buffer that you can pick pixels from, you're going to have to spend some time and effort with a toolkit that can handle all the file format parsing for you. Cleek | Image Toolkits | Thumbnail maker

              C 1 Reply Last reply
              0
              • C Chris Losinger

                this is a really big task. i recommend you look into something like GDI+, or a toolkit like CIXImage (here on CodeProject), or even a commercial product (for example, the one at the bottom of this post). if you want to be able to read any kind of image file into a buffer that you can pick pixels from, you're going to have to spend some time and effort with a toolkit that can handle all the file format parsing for you. Cleek | Image Toolkits | Thumbnail maker

                C Offline
                C Offline
                chethan karupakala
                wrote on last edited by
                #7

                thank u for posting ur suggestion sir, is there any other way so that i can distinguish each and every pixel apart from intensity of the pixel

                C 1 Reply Last reply
                0
                • C chethan karupakala

                  thank u for posting ur suggestion sir, is there any other way so that i can distinguish each and every pixel apart from intensity of the pixel

                  C Offline
                  C Offline
                  Cool Ju
                  wrote on last edited by
                  #8

                  Hi, AFIK there is no other way to distinguish pixels becuase an image is a record of intensity values. But you can use the derivatives of the intensity value like brightness, contrast, color, gamma etc... Regarding your first question...I second chris...because its a huge task to convert any image into a matrix form. Better you opt any tools or libraries. Or else do it for the widely used image formats instead of all. Bye, Cool Ju :cool: Dream Ur Destiny

                  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