Image Watch

Microsoft Free

Provides a watch window for visualizing in-memory images (bitmaps) when debugging native C++ code.

Microsoft
(25) Review
Visual Studio
2013, 2012
Download (20,709)
3/17/2014
1.5.1103.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (25)
Q and A (58)
Sign in to write a review
Sort by:

by Rob42_ | August 04 2014

Thanks for this great extension to Visual Studio,
would like to see this open sourced to add even more features.

by Mudit Agrawal | June 24 2014

This is indeed a game changer! Debugging in-memory images has always been so hard in VS. The simple power of Image-Watch visualization, combined with the efficient operators can turn hours of debugging to minutes or seconds.

Great work!

by lin jingxian | April 06 2014

sounds good, but can not use with vs 2013 express ?

by V.N.V | February 23 2014

Just a note to say a simple Thank You to the author.

This extension is excellent.

It provides a "quicklook" into a sequence of images from a loop.

Without it, I'd be spending much more time on the problem. I'd need to save each image to disk, with a serialized name,
and bring each up individually in an external viewer.

by Daehoe Kim | January 28 2014

Excellent tool. I love it :)

by Chris Sienkiewicz | December 26 2013

Fantastic add in, makes working with images so much easier.

by Akhil Prem | November 19 2013

Very handy when working with images. I love it that I can use it with custom image types using NatVis.

by Trass3r | November 14 2013

This is a lifesaver!

by sarthakpati | October 01 2013

by LevonGn | September 26 2013

by Alessandro R Silva | September 07 2013

This is one of the reasons why i develop in Windows in openCV. A Extraordinary tool, with no match.

by Son D Tran | Fri 8:54 PM

by Brian Catlin | August 11 2013

This awesome tool makes developing OpenCV programs a breeze!

by stocastico | August 07 2013

Excellent tool, highly recommended

by Mahesh.Nalam | July 17 2013

This is Very useful tool

by Eric Stollnitz | July 08 2013

This is an excellent tool for viewing images while debugging. Saved me tons of time!

by The Great Fox | June 21 2013

It's an awesome tool for debugging.

You should add Zoom In/Out and Pan though - it would really help when debugging large Font texture-atlases. You want to be able to zoom in the 128x512 bitmap and see how it looks.

Great work! :)

by knauer0x | June 21 2013

Nice tool!

by Arkady Shapkin | June 18 2013

by primfaktor | June 18 2013

This makes debugging IPCV so much easier. Great tool!

1 - 20 of 25 Items   
Sign in to start a discussion


  • Lambda functions
    1 Posts | Last post Sun 8:48 AM
    • Are there any plans to enable evaluation of lambda functions in debugger/Image Watch? It would be very handy to define simple lambda functions that capture current context and call them from image watch.
      
      This question is probably not only related to the Image Watch tool but also to the Visual Studio debugger in general. Any comments on this would be helpful. Thank you.
      
      
      
      
  • Lambda functions
    1 Posts | Last post Sun 8:48 AM
    • Are there any plans to enable evaluation of lambda functions in debugger/Image Watch? It would be very handy to define simple lambda functions that capture current context and call them from image watch.
      
      This question is probably not only related to the Image Watch tool but also to the Visual Studio debugger in general. Any comments on this would be helpful. Thank you.
      
      
      
      
  • Debugging slow with 4k x 3k images?
    3 Posts | Last post August 04, 2014
    • I've been using Image Watch since its release with images like 640 x 480, 1280 x 720 and similar, and never had any problems. More recently, I'm working with images that are 4320 x 3240 and similar, and the debugging is very slow. Stepping from one line to the next takes around 0.5 to 1 second, even if the image is not modified at all.
      
      Is something wrong with my system or is it a current limitation of Image Watch?
    • Hi Elador,
      
      there is nothing wrong with your system. 
      
      Here's why it is slow. The debugger has no way of knowing whether a block of memory in your app is modified when you step over a line of code. That's why it needs to make a fresh copy of *all* the pixels that you're viewing in Image Watch after *every* step. This simply takes longer if you have large images. 
      
      Image Watch is trying to be smart about this, though. It only reloads the pixels for the images you can actually see, either in the viewer area or as thumbnails in the image list. So, if you have no image selected for viewing, and if you collapse the image list so that you don't see the thumbnails (right click -> collapse all), then single stepping should be much faster. Another way to do this is to keep the Watch list empty and switch between Locals/Watch depending on whether you want to see pixels or not during your debugging session.
      
      Hope that helps!
      
      -Wolf
    • Hi Wolf,
      
      That sounds reasonable. Good to know. Thank you very much for your suggestions - either going to an empty Watch-window or collapsing the images works great!
      
      Thank you!
  • Assertion Error
    3 Posts | Last post July 30, 2014
    • Hi.
      When I create the image with the size(1,65536), a problem of assertion error comes up in invalid image info. After I closed the this window, this problem did not come up. I think that image size is exceeded defined size.
      
      What's the maximum size used to image watch?
      If it wasn't for image size, what's the problem?
    • Hi Stacy, 
      
      thanks a lot for reporting this. Yes, the maximum size is 65535. The assertion window should not show, however. That's a bug. We'll have that fixed in the next release. We may increase the maximum image size, too :). 
      
      Thanks again!
      
      -Wolf
    • I would also profit from larger supported image sizes. I have matrices that are around sizes like 80000 x 120 and it would be a great help to be able to see them. At the moment I always have to insert "debug-code" that extracts smaller submatrices to be able to view them.
  • Showing [invalid]
    3 Posts | Last post July 24, 2014
    • Hi, 
      First of all thanks a lot for this great tool. It makes our life much easier!
      I am trying to play with user-defined image type as part of project use user-defined image. 
      
      My image type is:
      struct IVC_DBIMG{
          int ncols;
          int nrows;
          int minx;
          int miny;
          int maxx;
          int maxy;
          double *data;
      } ;
      ----------------
      
      When I put the variable into Visual studio watch, I can see the channels=1, type=FLOAT64 and width, height and stride are the same as the variable I declared. 
      However, when I add the variable into ImageWatch, it shows it's invalid. [invalid] is shown on the snapshot and two [invalid]s are showing on the side. Here is the definition file:
      
        <Type Name="IVC_DBIMG">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        </Type>
      
        <Type Name="IVC_DBIMG">
          <Expand>
            <Synthetic Name="[type]">
              <DisplayString>FLOAT64</DisplayString>
            </Synthetic>
            <Item Name="[channels]">1</Item>
            <Item Name="[width]">ncols</Item>
            <Item Name="[height]">nrows</Item>
            <Item Name="[data]">data</Item>
            <Item Name="[stride]">ncols</Item>
          </Expand>
        </Type>
      
      I am using VS2012. The ImageWatch.log file shows that the IVC_DBIMG type is detected and added. 
      
      Can anyone provide tips on what might go wrong here?
      
      Thanks a lot in advance. 
      
      Jason
      
    • The [stride] should be in bytes, so in your case 8*ncols
    • Matt,
      
      Thanks a lot. It works now!!! :)
      
      
  • Extension name was misleading
    2 Posts | Last post May 30, 2014
    • Reading the description of this extension I thought ... "oh, I sure missed something, I'll try".
      Now I know, I didn't miss something - in the description!
      
      But I miss something while using Image Watch! The support for build in types, like HBITMAP, HICON, HIMAGELIST.
      
      Why not supporting such handles to bitmaps in Image Watch?
      
      Best regards,
      
      Martin
    • Thanks for your feedback, Martin. 
      
      I agree it would be nice to be able to see HICONs etc in Image Watch. The reason why we haven't done this yet is that Image Watch needs to know the internal data structures behind those handles, but those are not public. Of course, working at Microsoft, we could get this information and put it in Image Watch. But this means Image Watch would now have to track which Windows version (existing and future) uses which internal data layout. This is not feasible given our limited resources for the project. Sorry. :/
      
      -Wolf
  • exception has been thrown by the target of an invocation
    2 Posts | Last post May 02, 2014
    • when i start the Image Watch an error throwed "exception has  been thrown by the target of an invocation". 
      I have uncheced Managed C++ Compatibility Mode.
      My vs version is 2013, i have updated with update 1 package .
    • Which process is throwing the exception, your app or Visual Studio?
  • Can I use vs2013?
    4 Posts | Last post April 30, 2014
    • Can I use vs2013? 
      I am using vs2013 to "[invalid]" has been output.
      Below is a sample code.
      
      struct My8BitRGBImage
      {
      	unsigned int ncols;
      	unsigned int nrows;
      	unsigned char* data;
      };
      
      
        <Type Name="My8BitRGBImage">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        </Type>
       
        <Type Name="My8BitRGBImage">
          <Expand>
            <Synthetic Name="[type]">
              <DisplayString>UINT8</DisplayString>
            </Synthetic>
            <Synthetic Name="[channels]">
              <DisplayString>RGB</DisplayString>
            </Synthetic>
            <Item Name="[width]">ncols</Item>
            <Item Name="[height]">nrows</Item>
            <Item Name="[data]">data</Item>
            <Item Name="[stride]">ncols*3</Item>
          </Expand>
        </Type>  
    • and i am unchecked Use Managed Compatibility Mode in debug option
    • ye.. Solved
    • i have the same problem with you ,could you tell me how you sloved it.thank u . 
  • diagnostics
    5 Posts | Last post April 17, 2014
    • Is it possible to have error diagnostics? Either in the watch window itself or in the debug output together with the other natvis messages.
      It's really hard to tell why it doesn't display the image based on "[invalid]".
    • Hi Trass3r, thanks for the feedback. We've noticed that, too, and it's on our list. 
      
      In the meantime, I find it easiest to debug a natvis in two steps:
      
      First, disregard Image Watch and just look at the built-in Locals/Autos/Watch window. If you don't see your natvis items there ("[width]", for example), you have a bug in your natvis. That bug is unrelated to Image Watch and can be investigated using Visual Studio's built-in natvis diagnostics. 
      
      Then, once the natvis is working, it should be fairly straightforward to see why Image Watch shows "[invalid]".
      
      Hope that helps. Good luck! -Wolf
      
    • Everything is fine. And a manual '@mem(img.m_storage.m_data,FLOAT32,1,16,16,64)' works.
      
      <Item Name="[channels]">1</Item>
      <Item Name="[width]">m_storage.m_cols</Item>
      <Item Name="[height]">m_storage.m_rows</Item>
      <Item Name="[data]">m_storage.m_data</Item>
      <Item Name="[stride]">m_storage.m_cols * sizeof($T1)</Item>
      
      [type]	FLOAT32	
      [channels]	1	int
      [width]	16	unsigned __int64
      [height]	16	unsigned __int64
      [data]	0x000000000030d960	void *
      [stride]	64	unsigned __int64
      
      I also tried various casts cause I think a had a problem with the types before.
      But nothing happens.
    • Any ideas?
    • Hey Trass3r--sorry for the delay. Are debugging in mixed-mode? Also, would you mind providing a repro (C++ type definition + natvis)? Thanks!
  • Dump file formats
    2 Posts | Last post April 03, 2014
    • Hi,
      
      are there any rules associated with dumping to example a JPG or PNG file?
      I created a natvis file for our image data, but I can only dump to a .BIN file.
      
      
      Regards,
      
      Joris
    • Hi Joris,
      
      the current rule is that images with 1, 3, or 4 channels can be saved as .jpg or .png. We might remove that restriction in the future. As a workaround for now you can extract a single channel using the @band operator in the watch window. The result will be a single-channel image which can be saved as .jpg or .png.
      
      That said, at some point we were considering an option that would allow you to save any image type in a simple (but potentially very inefficient) file format (like OpenCV's XML image format). That feature hasn't made it to the top of the list yet, but if that is something of interest, please let us know here in the forum.
      
      Thanks!
      
      -Wolf
1 - 10 of 58 Items