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. opencv with MFC

opencv with MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
5 Posts 3 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.
  • J Offline
    J Offline
    jawadali477
    wrote on last edited by
    #1

    hi, i am developing a program using MFC in vs2008. i'm using opencv lib with MFC for image processing. part of the program has been developed where i can open an image residing in a file. now i wanted to get the coordinates of the opened image with double click of mouse on the image using mouse callback function. can any one help me regarding this? Regards Jawad

    L S 2 Replies Last reply
    0
    • J jawadali477

      hi, i am developing a program using MFC in vs2008. i'm using opencv lib with MFC for image processing. part of the program has been developed where i can open an image residing in a file. now i wanted to get the coordinates of the opened image with double click of mouse on the image using mouse callback function. can any one help me regarding this? Regards Jawad

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      jawadali477 wrote:

      get the coordinates of the opened image with double click of mouse on the image using mouse callback function.

      When you click on any Window you will get a notification from the system which includes the location of the mouse when it was clicked. See here[^] for details of each specific message.

      speaking as ...

      1 Reply Last reply
      0
      • J jawadali477

        hi, i am developing a program using MFC in vs2008. i'm using opencv lib with MFC for image processing. part of the program has been developed where i can open an image residing in a file. now i wanted to get the coordinates of the opened image with double click of mouse on the image using mouse callback function. can any one help me regarding this? Regards Jawad

        S Offline
        S Offline
        Sivaraman Dhamodharan
        wrote on last edited by
        #3

        Quote:

        get the coordinates of the opened image

        You mean you want to get the Image Height and Width. What Co-ordinate you are talking about?

        Programming Article

        J 1 Reply Last reply
        0
        • S Sivaraman Dhamodharan

          Quote:

          get the coordinates of the opened image

          You mean you want to get the Image Height and Width. What Co-ordinate you are talking about?

          Programming Article

          J Offline
          J Offline
          jawadali477
          wrote on last edited by
          #4

          yes, i'm talking about the pixel coordinates (i.e pixel height and width).

          S 1 Reply Last reply
          0
          • J jawadali477

            yes, i'm talking about the pixel coordinates (i.e pixel height and width).

            S Offline
            S Offline
            Sivaraman Dhamodharan
            wrote on last edited by
            #5

            The bitmap file usually have a BITMAP header, color palette and actual pixel information (Bits referring the color palette or raw bits if color palette not used). The bitmap header will have the height and width of the image.

            Quote:

            typedef struct tagBITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1]; } BITMAPINFO;

            Taken the above one from msdn. The

            Quote:

            BITMAPINFOHEADER

            structure has the information you need.

            Programming Article

            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