Image Region

Image Region - ⛔ Extends SMath Studio with an Image Region. - Messages

#1 Posted: 5/2/2013 8:04:34 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Extends SMath Studio with an Image Region.

Show Spoiler



[albumimg]96[/albumimg] [albumimg]106[/albumimg]
Russia ☭ forever, Viacheslav N. Mezentsev
3 users liked this post
Andrey Ivashov 5/2/2013 8:18:00 AM, Radovan Omorjan 5/2/2013 8:33:00 AM, Davide Carpi 5/2/2013 6:26:00 PM
#2 Posted: 5/2/2013 11:31:11 AM
kaka

kaka

1 likes in 25 posts.

Group: User

Wrote

Need to change size manually after recalculation.

Sources: https://smath.info/svn/public/plugins/ImageRegion/

[albumimg]96[/albumimg]



Like this one. If will be great to load and display the excel file in Smath as well.
#3 Posted: 5/2/2013 5:10:56 PM
kaka

kaka

1 likes in 25 posts.

Group: User

why I cannot find the dll in the zip file.
#4 Posted: 5/2/2013 6:03:19 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Same problem here. The plugin folder in the zip file is empty.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Posted: 5/2/2013 6:06:28 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Oh, sorry, now fixed.
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
Davide Carpi 5/2/2013 6:26:00 PM, Martin Kraska 5/2/2013 6:19:00 PM
#6 Posted: 5/2/2013 6:29:50 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Plugin works, except for Mathcad file acces, which I have not installed yet. Also, I did not test the image import.

Resizing requires just to touch the handles, then the size jumps to correct value. One has to be careful with image size, using 128x128 for the second image, Smath crashed when I tried to rename the variable image.

Also, there seems to be an indexing problem. For some sizes, the result of the second computation does not overwrite the upper left rectangle as expected but has some shift. Don't know if that is due to the formula or due to the plugin.
imageregion1.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
#7 Posted: 5/2/2013 6:36:06 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Yes, it's strange. I'll see what's up. I need more sleep.

P.S. We have to change the names of variables. We use the same variable image.
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Davide Carpi 5/2/2013 6:38:00 PM
#8 Posted: 5/4/2013 6:57:21 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I did some more testing in connection with MathcadFileAccess.

The image region produced artefacts with data read by READRGB(). It seems that from a certain point there is a shift in pixel indexing. Graylevels read by READ_IMAGE are displayed correctly, just as images from files.
The problem does not occur with the win logo from your MathcadFileAccess Examples. It, however, persists if I save the fhb logo in different formats, including various tastes of bmp.

Also, the SMath logo as available at the download section in the forum is not displayed correctly. READ_IMAGE fails to read it at all.

P.S. I also noticed that I cannot put a function call to the placeholder but have to assign a matrix in advance.

P.P.S: The gray level image has slightly colored shades in the image which are obvious in high zoom levels. I can't tell if that is a READ_IMAGE problem or an imageregion problem.
imageregion2.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
#9 Posted: 5/4/2013 10:36:27 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Updated (MathcadFileAccess_20130504 and ImageRegion_20130504).
mkraska, I found two errors in the functions. Thanks for your examples.

Not all image formats are supported. Some files can't be loaded.

P.S. LitePipe Demo example.

[albumimg]105[/albumimg]
LitePipes_20130504.zip (1 MiB) downloaded 68 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Martin Kraska 5/4/2013 11:23:00 AM
#10 Posted: 5/4/2013 11:36:19 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote


Not all image formats are supported. Some files can't be loaded.



uni, thanks again for bugfixing. What a pity that the SMath logo is one of poor unloadable files...

After updating both MathcadFileAccess and ImageRegion:
- The imageregion example works fine.
- The image examples in the MathcadFileAccess examples dir have no images included.
- There is a hardwired local path from your computer in the writebin example. If changed to currentdir everything works.

My examples, however, do not work.
- The vertical offset of the lower right image triangle has gone
- The colorful artefacts in the graylevel plots have gone
- Now, there is a more obvious horizontal shift in the image

Do i have to assume that my test image is buggy? It is the very expemsive new official logo of our school, taken from the website.

P.S. I did not get to run the mcadefi stuff so far. This trick with putting it beside the smath exe did not work for me.

imageregion3.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#11 Posted: 5/4/2013 11:42:37 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

This is strange, I checked the plugin on your example. Check version:

ImageRegion - 1.0.4872.36288,
MathcadFileAccess - 1.0.4872.36253.

I forgot to say that you need to update both plugins. Errors have been in both plugins simultaneously.
Russia ☭ forever, Viacheslav N. Mezentsev
#12 Posted: 5/4/2013 12:17:50 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

This is strange, I checked the plugin on your example. Check version:

ImageRegion - 1.0.4872.36288,
MathcadFileAccess - 1.0.4872.36253.

I forgot to say that you need to update both plugins. Errors have been in both plugins simultaneously.



You are right, It was my fault. I failed to complete the update by moving the dll...

Now just the smath logo seems to resist the debugging effort.



imageregion4.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#13 Posted: 5/4/2013 12:41:11 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

I compared the results with Mathcad and I think I swapped the colors (I'll read the Mathcad Help).

[albumimg]106[/albumimg]
Russia ☭ forever, Viacheslav N. Mezentsev
#14 Posted: 5/4/2013 3:13:00 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Updated. Now colors not swapped. Small improvements.
Russia ☭ forever, Viacheslav N. Mezentsev
#15 Posted: 10/12/2013 2:26:34 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Updated. Added support for svg.

[albumimg]318[/albumimg] [albumimg]319[/albumimg]
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
Martin Kraska 10/12/2013 7:26:00 AM, Davide Carpi 10/13/2013 6:30:00 AM
#16 Posted: 10/12/2013 7:34:10 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I cannot display the attached image (had to zip the image because svg is not allowed as attachment file type). The file is generated using TpX and cleanly displays in IE.

Also, after downloading the plugin, further access to the online gallery is denied. This also happens with Davide's Conditionally Formatted Label but not with Andrey's Excel Files Plugin.

Tested with the installer version of 0.96.4909 using plugin version 1.0.5033.22634

No such access problems with the portable version. The display problem is present in both versions.
Moment-2.zip (1 KiB) downloaded 68 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#17 Posted: 10/12/2013 9:51:48 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Updated. Try now.
ImageRegion. SVG. Example 3.png
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Martin Kraska 10/12/2013 10:04:00 AM
#18 Posted: 10/12/2013 10:08:30 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Confirmed for installer and portable version, works now. Thanks a lot.

Gallery access issue remains, but might have causes outside the plugin.

PS: how about an optional background? The grid is visible through the image, which is close to paper-and-pencil-feeling, but which might be a matter of taste -> optional setting would be fine.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#19 Posted: 10/12/2013 10:14:56 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

PS: how about an optional background? The grid is visible through the image, which is close to paper-and-pencil-feeling, but which might be a matter of taste -> optional setting would be fine.


Ok, I'll do it later.
Russia ☭ forever, Viacheslav N. Mezentsev
#20 Posted: 10/12/2013 10:27:38 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Wrote

PS: how about an optional background? The grid is visible through the image, which is close to paper-and-pencil-feeling, but which might be a matter of taste -> optional setting would be fine.


Ok, I'll do it later.


Looking forward to the implementation.

Still there is another, more important issue: could you please interpret relative paths with respect to the directory of the current SMath document instead of the current directory? This would create portable documents and enable putting examples in the activebook help system.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts