Skip to main content
4-Participant
March 22, 2023
Question

Viewing images in MathCAD 9.0

  • March 22, 2023
  • 1 reply
  • 4327 views

I'm trialling 9.0 just to get a feel for some image processing stuff, but already hit a problem:

 

I've created a tiny matrix of grey scale values.

I can write that out to a .bmp file using WRITEBMP (although I don't understand the "=0" syntax required for it to work?)

I can read the bit map in again using READBMP and show the greyscale values again, so far so good.

 

But how can I actually view the image as an image?

 

As far as I can tell, there is no graph or plot function that can show a 2d plot of squares, each with a different shade of grey based on an 8 bit value.

Neither does there appear to be another function to show the image (not the numbers) of a bitmap.

 

I can insert a picture from file, but when I do this a.) it seems to show smoothing/interpolation between pixel values (where does this come from - if I open the image in windows Photos app it displays 9 pixels as expected ?!) and b.) it does not update if matrix values are changed.

 

I am assuming that I am missing some simple method of viewing the images.  There seems little point in having a nice set of image processing functions if you can't visualise the impact it has on your image at each step!!

 

Any help very much appreciated.

Thanks

Ian

1 reply

25-Diamond I
March 22, 2023

Unfortunately you are not missing some simple method!

The feature you request is available for a very long time in real mathcad (MC15 and below), but not (yet?) in Prime. Incredible, sure not understandable, but true. I guess its a feature planned for future versions of Prime.

At the time being you are supposed to save the file to disk and insert that saved file from there 😞

I agree that that's unreasonable when you're actually into serious image processing.
And yes, copy and paste in either direction is another of the many issues in Prime - the quality has never been as good as it should be or as we would expect it to be.

Did you try the "image" button to insert an image?

Werner_E_0-1679504542435.png

 

4-Participant
March 22, 2023

Thanks for quick response!

 

OK, so insert picture is only way - very disapointing but I can live with that, but how come it is changing the raw data and creating more than 9 pixels?

 

Ian

 

4-Participant
March 22, 2023

Yes.  image button then prompts to browse for file and inserts picture.  But this is not embedded link.

If I insert object, 'new' and then browse for file - this gives an embedded link.  It does not update automatically, but i double clicked it opens native application (usually paint for bitmaps).  This then refreshes the data and updates the image in mathcad.

 

But BOTH methods show the image in mathcad as smoothed.  But (and this is crazy), when the link opens paint to show the file, it is correct !!!.  Only the 9 pixels shown in paint - but mathcad image STILL smoothed.

 

I really don't get it - its really no use at all.

 

Also, can you explain why the WRITEBMP command needs "=0" at the end?  This is not explained anywhere.

 

Thanks

Ian