Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
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?
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
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
@IG_10614469 wrote:
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
I can only confirm that that kind of undesired antialiasing effect occurs when we insert a picture AND enlarge it in Prime after inserting it.
It may be due to some unfortunate way PTC has implemented image insertion or the algorithm used when you resize a picture in Prime.
I agree thats quite disappointing.
Maybe a crude workaround for you could be to scale up the image before saving it you you don't have to scale the inserted picture in Prime. I guess that there still would be some antialiasing but much less noticeable.
EDIT: Ooops, I had forgotten that we can use the built-in "zoom" function to do the resizing of the picture matrix:
It's a good workaround. But it's only hiding the effect visually at the borders right? Also, a large image would have to be stored 50x50 larger. All not very desirable.
Thanks for trying though!
Q1: You have used the syntax "dummy:=WRITEBMP(path,M)"
I used the syntax "WRITEBMP(path,M)=0"
What is the difference, and what is assigned to 'dummy' and what does the "=0" mean?
Q2: Are you representative of PTC or just a super-user? It would be good to flag this issue to PTC but I'm not sure how to. After I installed trial I got sales email to check all was good. I replied about this issue but have got zero response - again very disapointing!!
Many Thanks
Ian
I am not quite sure if the workaround is just hiding the effect visually. It could be that the antialiasing only is done on the fly when you enlarge the picture in Prime. So when you just insert it without rescaling it afterwards, maybe no antialiasing is done. But then, I am not sure.
I agree that its undesirable to have to increase the file size that way, especially as BMP is not compressing, But then its even more annoying that changes in the matrix do not immediately result in a change of the picture. The pic is not live and dynamically as in MC15- but just static and neither connected to the saved file nor the Prime matrix and has to be inserted over and over again. A no-go.
"WRITEBMP(path,M)=" works as well as my "dummy=...", just two different ways to force "evaluation" of the WRITEBMP function. IN older Mathcad the result of the evaluation was not 0 but the matrix itself which looked ugly and was space consuming. Thats the reason I am used to rather assign the result a dummy variable.
I am not affiliated with PTC in any way other than using software which unfortunately was bought by PTC. I am not a "super-user" either but just someone who has been using MC for a very long time, so inevitably I've had quite a bit of experience with the software.
Getting in contact with the right people at PTC can be a hard way, as we could often read here in the forum. But once they have luck they usually report about a very efficient handling of their problems. So my conclusion is that PTC has competent staff but hides them efficiently 😉
But if you are not a paying customer with an active subscription, PTC would not be interested in your opinions, feedback or bug reports. Opening a case at PTC support can only be done with an active subscription.
There is also an "ideas" section somewhere here in the forum, where users can place ideas for improvement and feature requests and other users can vote for these ideas. PTC claims that development will consider the "ideas" with the most votes for future versions. That's something you can believe, but don't necessarily have to believe.
Thanks for your help. 😁
Shame the functionality in Prime is lacking. 😓
@IG_10614469 wrote:
Thanks for your help. 😁
Shame the functionality in Prime is lacking. 😓
agreed on.
As you can read here
"Image Tool/Picture Operator" is a "candidate" (whatever this really means) for Prime 10, 11, 12 ,....
We will have to wait and hope that we get something which is better done and not like the "improvement" of the mediocre 2D plot via a badly integrated third party tool or the implementation of the combo boxes with their limits when it comes to units.