Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


6 Pages<12345>»
Options
Go to last post Go to first unread
Offline mikekaganski  
#41 Posted : 17 April 2016 17:31:46(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Oh, you play Captain Obvious again. I clearly understand the plugin purpose, and my request is quite clearly formulated, plugin's maintainer understands it. Please don't make it difficult to track this request by irrelevant info.
Best regards,
Mike Kaganski
Offline Jean Giraud  
#42 Posted : 17 April 2016 17:34:31(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: mikekaganski Go to Quoted Post
Yes, Jean, I was asking for this And exactly because of your Venturi rotation task - I wanted to see it rotated coloured.


It can't rotate RGB for two reasons:
1. It does not rotate the grayscale from your suggestions
2. Smath does not have an RGB picture operator [something like Mathcad].


Frustration.gif

Offline mikekaganski  
#43 Posted : 17 April 2016 17:41:17(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: mikekaganski Go to Quoted Post
Yes, Jean, I was asking for this And exactly because of your Venturi rotation task - I wanted to see it rotated coloured.


It can't rotate RGB for two reasons:
1. It does not rotate the grayscale from your suggestions
2. Smath does not have an RGB picture operator [something like Mathcad].


Frustration.gif



I rotate it using the algorithm you provided (and I fixed - see that topic). I only cannot see that already rotated matrix colored!
Best regards,
Mike Kaganski
Offline frapuano  
#44 Posted : 17 April 2016 20:09:32(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
Mike,

do not give up ..even if ... it is very hard. Good

Best Regards

Franco
Offline Alex M.  
#45 Posted : 17 April 2016 20:12:27(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Mike, Jean,

Can you decide on input format for and RGB? Matrix, system, etc...

RGB should not be too hard to implement, just a matter of finding some 4 hours of my time... Alpha is not as straightforward. Do we need alpha?
Offline Davide Carpi  
#46 Posted : 18 April 2016 01:01:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Mike, Jean,

Can you decide on input format for and RGB? Matrix, system, etc...

RGB should not be too hard to implement, just a matter of finding some 4 hours of my time... Alpha is not as straightforward. Do we need alpha?


Alex, you can setup easily different base schemes and parse each color channel with a function aside (then you have to check if the 3 dimensions are equal); alpha channel can be an optional 4th argument (maybe you can loot at PieChartRegion to see how to allow different schemes).

2016-04-17 23_58_41-SMath Studio Desktop - [Page1_].png

Edited by user 18 April 2016 01:03:37(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline mikekaganski  
#47 Posted : 18 April 2016 01:36:50(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Can you decide on input format for and RGB? Matrix, system, etc...

I vote for system.
Matrix of 3(4)-element vectors should be easiest to implement, but creating it takes considerably longer, and managing it is less convenient.
Actually, system looks more natural in SMath Good If you would implement matrix of vectors, then please just in addition to system.

Mathcad seems to have another option - packed matrix that has its height equal to image height, and its width 3x image width, its first 1/3 cols being R, after that go 1/3 cols of G, and last are B. But I dislike that route, because then it's unclear when it's gray bitmap of triple width, and when it's RGB packed matrix.

Using matrix of 24-bit numbers isn't good, too, because it won't be easy and robust to tell 24(32)-bit from 8-bit. It's possible for an image to have only one color, so that it would be falsely treated as 8-bit.

Another option is 3(4)-element vector of matrices. I don't see much advantage in this compared to system.

Generalizing, one can think of more complex schemas: system of separate images where each image has own dimensions and position, thus creating patchwork.

But you know, my imagination is inflamed from sleepless night. Please scrap all this and do what you feel like.

Quote:
RGB should not be too hard to implement, just a matter of finding some 4 hours of my time... Alpha is not as straightforward. Do we need alpha?

Personally I don't really need Alpha, and only wanted it for completeness.
But I don't see why it's not straightforward. At the link above that discusses it, I see that the only requirement for it is creating not PixelFormat.Format32bppRgb, but PixelFormat.Format32bppArgb, and then each pixel is defined with not 3, but 4 bytes (B,G,R,Alpha). So, I think, that if you simply detect that input is system, then check if it contains exactly 3 or 4 matrices, that all of them are same size, and then if 3, then create PixelFormat.Format32bppRgb and do 3-byte processing (like it is now for ordinary matrices), and if 4, then create PixelFormat.Format32bppArgb and do 4-byte.

Anyway, if you feel like it's overkill, then please skip it!
Best regards,
Mike Kaganski
Offline Jean Giraud  
#48 Posted : 18 April 2016 01:53:42(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Mike, Jean,

Can you decide on input format for and RGB? Matrix, system, etc...

RGB should not be too hard to implement, just a matter of finding some 4 hours of my time... Alpha is not as straightforward. Do we need alpha?


Alex,

The RGB image is a matrix of the side by side R,G,B.
In other word: RGB:=augment( R,G,B )

Image READ COLOR.sm (73kb) downloaded 44 time(s).

Edited by moderator 18 April 2016 09:21:44(UTC)  | Reason: Not specified

Offline mikekaganski  
#49 Posted : 18 April 2016 02:03:17(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
The RGB image is a matrix of the side by side R,G,B.
In other word: RGB:=augment(R,G,B )


That's what Mathcad uses. But I commented about that.
To support Mathcad-style packed matrices, I suggest providing a function like
RGB(PackedMatrix)
that takes Mathcad-style augmented RGB matrix, and returns a structure (e.g. system) that would be supported by the extension.
Best regards,
Mike Kaganski
Offline Jean Giraud  
#50 Posted : 18 April 2016 07:20:51(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: mikekaganski Go to Quoted Post
That's what Mathcad uses. But I commented about that.
To support Mathcad-style packed matrices, I suggest providing a function like
RGB(PackedMatrix)
that takes Mathcad-style augmented RGB matrix, and returns a structure (e.g. system) that would be supported by the extension.


I think Mike, we are saying the same thing in different words.
Smath opens RGB in the same style as Mathcad. Smath does not
have a picture operator to resitute back the color channels.
The only things you can do in Smath is minimal processing on
each channel and restore back on the NTSC. That does not do much
useful, or exploitable.

Most interesting, cheers, Jean

PS: you don't shake hands every week end with Andrey
8761 km apart. A cyclo tour around Russia is quite a trip !

Offline uni  
#51 Posted : 18 April 2016 08:59:43(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
I want to remind you that we already have a function READRGB() which uses Mathcad style.

Originally Posted by: Jean Giraud Go to Quoted Post
Smath opens RGB in the same style as Mathcad

This is MathcadFileAccess plugin opens.

Edited by user 18 April 2016 09:06:36(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 18/04/2016(UTC)
Offline Alex M.  
#52 Posted : 20 April 2016 03:52:58(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
I am getting pretty close to posting an update with RGBA functionality.

I will need a little bit of your wisdom, Davide.

I added some new references to the .csproj file on my computer, and I had issues in the past editing the .csproj file in the SVN repo correctly. In fact I had many attempts at properly referencing the SMath libraries with no success (I still have static ioman.dll etc. instead). Could you show me how to do the following:

1. Add new references to the SVN by hand
2. Correctly reference the Smath Libraries in the .csproj file

I am attaching the local copy of the file here ImageEdit.csproj_.txt (7kb) downloaded 38 time(s).. Corresponding file from the SVN repo:
https://smath.info/svn/p...plugins/ImageEditRegion/
Offline Davide Carpi  
#53 Posted : 20 April 2016 11:27:59(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Alex,

You can add the following lines of code in your *.csproj and then upload it with the project; you have just to compile in "Debug" mode for testing in local, the "Relase" mode will be used automatically by the Relase Manager. In this way you don't have to deal with the project file anymore (except in rare cases, f.e. if you want to add unmanaged code libraries) Good

Code:
  <PropertyGroup>
    <!-- Relase -> SMath Relase Manager -->
    <SMathDir Condition=" '$(SMathDir)' == '' AND '$(Configuration)' == 'Relase' ">..\..\..\Main\SMathStudio\canvas\bin\Debug</SMathDir>
    <!-- Debug -> local use -->
    <SMathDir Condition=" '$(SMathDir)' == '' AND '$(Configuration)' == 'Debug' ">C:\Program Files (x86)\SMath Studio</SMathDir>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>$(SMathDir)\SMathStudio_Desktop.exe</StartProgram>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="SMath.Controls">
      <HintPath>$(SMathDir)\SMath.Controls.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Manager">
      <HintPath>$(SMathDir)\SMath.Manager.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Math.Numeric">
      <HintPath>$(SMathDir)\SMath.Math.Numeric.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Math.Symbolic">
      <HintPath>$(SMathDir)\SMath.Math.Symbolic.dll</HintPath>
      <Private>False</Private>
    </Reference>


ImageEdit.7z (2kb) downloaded 36 time(s).

Edited by user 20 April 2016 13:23:13(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#54 Posted : 20 April 2016 16:34:53(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Alex,

You can add the following lines of code in your *.csproj and then upload it with the project; you have just to compile in "Debug" mode for testing in local, the "Relase" mode will be used automatically by the Relase Manager. In this way you don't have to deal with the project file anymore (except in rare cases, f.e. if you want to add unmanaged code libraries) Good

Code:
  <PropertyGroup>
    <!-- Relase -> SMath Relase Manager -->
    <SMathDir Condition=" '$(SMathDir)' == '' AND '$(Configuration)' == 'Relase' ">..\..\..\Main\SMathStudio\canvas\bin\Debug</SMathDir>
    <!-- Debug -> local use -->
    <SMathDir Condition=" '$(SMathDir)' == '' AND '$(Configuration)' == 'Debug' ">C:\Program Files (x86)\SMath Studio</SMathDir>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>$(SMathDir)\SMathStudio_Desktop.exe</StartProgram>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="SMath.Controls">
      <HintPath>$(SMathDir)\SMath.Controls.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Manager">
      <HintPath>$(SMathDir)\SMath.Manager.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Math.Numeric">
      <HintPath>$(SMathDir)\SMath.Math.Numeric.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SMath.Math.Symbolic">
      <HintPath>$(SMathDir)\SMath.Math.Symbolic.dll</HintPath>
      <Private>False</Private>
    </Reference>


ImageEdit.7z (2kb) downloaded 36 time(s).


This works! Now, since I use the latest reference, I get this warning:
Warning 3 'SMath.Math.Decision.Preprocessing(SMath.Manager.Term[], ref SMath.Math.Store)' is obsolete: 'Use Entry instead of Term[]'
for
var out1 = Decision.Preprocessing(Terms, ref store);


Everything builds though on the local computer

In the release manager I get an error, here is the log for the updated .csproj file in SVN
report.log.txt (46kb) downloaded 38 time(s).

Edited by user 20 April 2016 16:44:15(UTC)  | Reason: Not specified

Offline Davide Carpi  
#55 Posted : 20 April 2016 18:21:21(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Alex.M Go to Quoted Post
This works! Now, since I use the latest reference, I get this warning:
Warning 3 'SMath.Math.Decision.Preprocessing(SMath.Manager.Term[], ref SMath.Math.Store)' is obsolete: 'Use Entry instead of Term[]'
for
var out1 = Decision.Preprocessing(Terms, ref store);

This is because since SS 0.98 Andrey has changed the core:
Andrey Ivashov wrote:
SMath Studio was completely switched from Term[] to Entry. Entry is a new way to store equations in SMath Studio. To allow plug-ins to work with new objects in more efficient manner new interface was introduced: IPluginLowLevelEvaluationFast.
But it is not required to update all your plug-ins to use new interface asap (f.e. built-in SpecialFunctions currently uses both interfaces: old and new). New interface is much better for implementing functions like "for", "while", "line", "if", etc.

Yes, IPluginLowLevelEvaluation a bit slower then IPluginLowLevelEvaluationFast just because we have to convert data from Entry to Term[] and back to proceed, but in most cases it is not a show stopper.

The warning shows the new way (not an error, as for now).

Originally Posted by: Alex.M Go to Quoted Post
In the release manager I get an error, here is the log for the updated .csproj file in SVN

I've updated the ImageEditRegion folder in the SVN:
- removed bin and obj folders (you can add these windows folders to the ignore list, so you can avoid to commit them unintentionally);

- fixed the *.csproj header: ToolsVersion "10.0" -> "4.0";
- RequestForEvaluation() updated to RequestEvaluation();
- removed references to the SS executable not driven by $(SMathDir);
- removed *.suo file, updated the project GUID in *.csproj, *.sln (not sure it is relevant, however seems more consistent);

I can run it successfully in Visual Studio 2015, SharpDevelop and the RelaseManager Good

Edited by user 20 April 2016 18:30:05(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#56 Posted : 20 April 2016 18:40:52(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Davide, the tweaks you made still do not allow me to build the plugin using
http://smath.info/ReleaseManager/
(same errors as in previous log)



Are you saying it works for you? Is it something to contact Andrey about?

Of course I can switch back to using old .dll's but it is not the right way going forward... Also how do I use Entry instead of Term? Will it make working with RGBA matrix faster?

Thanks
Offline Davide Carpi  
#57 Posted : 20 April 2016 18:49:06(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I confirm it works for me... which is the target version you are using?

2016-04-20 17_47_21-SMath Release Manager.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#58 Posted : 20 April 2016 18:56:00(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
I confirm it works for me... which is the target version you are using?

2016-04-20 17_47_21-SMath Release Manager.png


Fails for me

RMerr.png
report.log.txt (39kb) downloaded 36 time(s).

Time to contact Andrey.

Also what is you comment on this?


Quote:
Also how do I use Entry instead of Term? Will it make working with RGBA matrix faster?


Thanks!

Edited by user 20 April 2016 19:59:03(UTC)  | Reason: Not specified

Offline Davide Carpi  
#59 Posted : 20 April 2016 19:08:25(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Fails for me

Time to contact Andrey.


I think you are right... Sad

Code:
warning MSB3245: Could not resolve this reference. Could not locate the assembly "SMath.Controls". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [{SourcesDir}\ImageEdit.csproj]

Since I don't know how it works the RM, I can only suppose that there is some sort of "cache effect" for your account because previously you have compiled the plugin with the old APIs (?)...


Originally Posted by: Alex.M Go to Quoted Post
Also how do I use Entry instead of Term? Will it make working with RGBA matrix faster?


It may worth the effort, since images are made of a lot of data (you have to change just one thing - but actually I have no idea how to convert base.Terms to an Entry); just to mention, if you use it, the updates for SS versions < 0.98 are a little bit more difficult to provide (since you have to change the code).

Edited by user 20 April 2016 20:43:28(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#60 Posted : 21 April 2016 00:12:42(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Time to contact Andrey.

Error discovered in Release Manager. It is fixed now.
Please try to build plug-in again.

Best regards!
thanks 2 users thanked Andrey Ivashov for this useful post.
on 21/04/2016(UTC),  on 21/04/2016(UTC)
Users browsing this topic
6 Pages<12345>»
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.