Blog Post

Introducing Image Watch - A VS 2012 Plug-In for C++ Image and Video Debugging

Sign in to queue

Description

Image Watch is a new Visual Studio 2012 plug-in for debugging C++ image and video processing applications, for example photo or augmented reality apps. Image Watch provides a watch window that can display in-memory bitmaps during debugging, so you no longer need to litter your code with "save-this-intermediate-image-to-a-file" statements when tracking down bugs. The initial release has built-in support for OpenCV image types and can be extended for viewing user-defined image types as well.

Here, Wolf Kienzle, Senior Research Developer, Interactive Visual Media group, Microsoft Research Redmond, explains and demos this excellent new tool for C++ developers building image, video or augmented reality apps. In effect, you can step into pixels. Excellent!

Embed

Download

Download this episode

The Discussion

  • User profile image
    tomkirbygre​en

    Very cool, it's almost like having the Processing environment in the VC++ IDE! 

  • User profile image
    n0x30n

    I agree. Very cool.

    This should be integrated in all future versions of VS supporting all languages. (including all .NET framework image types of course)

  • User profile image
    Charles

    If you have technical questions you'd like addressed, we're going to dig into this in much more detail soon, so feel free to ask here.

    C

  • User profile image
    daniel z

    Does this only work with opencv? Can you please give some more infos on video debugging?

  • User profile image
    ComicSansMS

    Really amazing tool. Have worked with it barely one day and I'm already wondering how I could have ever lived without it.

    Any chance we could get support for additional channel formats? For example, I'm currently working with OpenGL textures stored as ABGR. It would be awesome if you could add some more permutations there. Or maybe even a generic mechanism for mapping color channels? After all, as inhabitants of the C++ land we are not afraid of bitmasks.

  • User profile image
    wolfkienzle

    @daniel z: You can view your own image types; details are described here. Regarding your second question, Image Watch does not play videos, but you can view individual frames as long as they are in a supported format (uncompressed interleaved 8bit RGB, for example).

  • User profile image
    wolfkienzle

    @ComicSansMS: Thanks! Yes, additional channel formats is something we are definitely considering. Please stay tuned!

  • User profile image
    AlessandroV

    Are you going to support planar images in the future?

  • User profile image
    schroedl

    So close to being useful.  We don't use OpenCV but would love to get the natvis description for some common MS formats such as:

    Gdiplus::Bitmap, Gdiplus::Image, WIC Images, HBITMAP

  • User profile image
    schroedl

    One other note, after installing this and restarting VS2012 Up1 my color scheme changed. I have the MS theme editor and it unexpectedly switched from the Light theme to a Red theme.

  • User profile image
    wolfkienzle

    @AlessandroV: Yes, we are going to support planar images in the future, possibly with the next update. Smiley

  • User profile image
    wolfkienzle

    @schroedl: The natvis description requires a pointer to the pixel data, which is not immediately accessibly with opaque handles like HBITMAP. That said, you can write natvis descriptions for the corresponding "locked" structures, e.g. BitmapData. We are currently working on a mechanism for supporting opaque types, but these are a bit tricky since you potentially need to run code in your app to get at the pixels.

  • User profile image
    Kirill Kornyakov

    Really cool idea, thank you for sharing this! I suppose that Windows-hosted OpenCV hackers will now have a huge advantage in comparison to others =)

  • User profile image
    Axel Rietschin

    +1 for "So close to being useful". HICON, HBITMAP, HCURSOR, IWICBitmapSource, Gdiplus::Bitmap and your potential user base expands by 100,000%

  • User profile image
    M Hogdahl

    I'm having trouble displaying 4-channel data with the RGBA format. The image info says '3 x UINT8 [RGBA]' and the image displayed looks like it was drawn with a 3-byte pixel stride instead of 4 bytes. When I use BGRA format the stride is correct and the viewer says 4 x UINT8. Is this a bug or have I messed up my natvis somehow?

    Apart from that little issue I'm really liking this plug-in. Thanks!

  • User profile image
    wolfkienzle

    @M Hogdahl:Yes, that's a bug, sorry. We'll have that fixed in the next update. Please see the Q&A section on the VS Gallery page for more information.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.