Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Image Processing with Flowstone?

DSP related issues, mathematics, processing and techniques

Image Processing with Flowstone?

Postby martinvicanek » Fri Mar 12, 2021 4:17 pm

Inspired by the recent Drop Shadow thread, I was wondering to what extent it was possible to do image processing with Flowstone. As promising as the possibilities of Ruby may be, unfortunately there is little available in the implementation at pixel level, and more unfortunately, excecution time is often prohibitive to allow even basic image transformations.

Flowstone has the assembler codebox as a fast number crunching engine, but it is a bit awqward to interface with an image format. Moreover, there are no 2D arrays in ASM and everything is very low level, which makes the addressable audience for this type of excercise rather small.

Anyway, here is an example of a drop shadow effect for an input image with an alpha channel for opacity. It uses a fast blur algorithm by Young et al., if you care.
capture.png
capture.png (33.98 KiB) Viewed 19438 times

ImageProcessing.fsm
(40.76 KiB) Downloaded 1068 times

It would be cool to drag the shadow with the mouse instead of setting x- and y-offsets with knobs. Any volunteers?
Last edited by martinvicanek on Fri Mar 12, 2021 6:23 pm, edited 1 time in total.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Image Processing with Flowstone?

Postby martinvicanek » Fri Mar 12, 2021 6:07 pm

A slight variation makes it possible to drop a shadow on a background image.
capture.png
capture.png (68.77 KiB) Viewed 19431 times

DropShadowOnBackgroundImage.fsm
(62.85 KiB) Downloaded 1070 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Image Processing with Flowstone?

Postby adamszabo » Sat Mar 13, 2021 12:48 am

Wow, now that is what you call "dope" :shock: :D
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Image Processing with Flowstone?

Postby tulamide » Sat Mar 13, 2021 2:02 am

It is somehow sad, that Martin has to use his ASM prowess just to realise what every graphic chip, incl. in-built chips, do so much faster, and with just one command. All the shaders that sit in my PC unused while ASM now needs to be used for both audio and graphics.

Sigh.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Image Processing with Flowstone?

Postby RJHollins » Sat Mar 13, 2021 2:29 am

... then you look inside at the Code, and realize how much knowledge goes into this.

Nice MV 8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Image Processing with Flowstone?

Postby Spogg » Sat Mar 13, 2021 8:22 am

Amazing work Martin! :o :shock:

I agree with tulamide that it’s such a shame we can’t access any modern graphics power. That crank handle on my Hurdy Gurdy used loads of CPU power and triggers. I got it as good as I could but once again it made me realise what could be done if only…
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Image Processing with Flowstone?

Postby deraudrl » Sat Mar 13, 2021 5:22 pm

Spogg wrote:I agree with tulamide that it’s such a shame we can’t access any modern graphics power.
Might not hurt to pass this along on the FS4 Slack forum "wish list". At the very least, with better access/insight into underlying memory structures etc, external graphics libraries/hardware would be in play via the DLL component.
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
deraudrl
 
Posts: 239
Joined: Thu Nov 28, 2019 9:12 pm
Location: SoCal

Re: Image Processing with Flowstone?

Postby tulamide » Sun Mar 14, 2021 5:02 am

deraudrl wrote:
Spogg wrote:I agree with tulamide that it’s such a shame we can’t access any modern graphics power.
Might not hurt to pass this along on the FS4 Slack forum "wish list". At the very least, with better access/insight into underlying memory structures etc, external graphics libraries/hardware would be in play via the DLL component.

Unfortunately, this was brought up several times. MyCo made his standpoint clear. He thinks, GDI+ is more than enough to do everything you want, graphics-wise.

Of course, that's not true. But that is also a problem for me. If he just would say, "OpenGL is over my head", or something along the lines, I could at least give up hope. But the way he said it, always let's me hope, that he's just stubborn, and would actually use OpenGL (or better yet, OpenCL, google it to see, why I think it would be the best for Flowstone), if only enough people ask for it. But, this goes on for 4 years now, wthout any sign, that MyCo could be convinced of the benefits.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Image Processing with Flowstone?

Postby Spogg » Sun Mar 14, 2021 7:58 am

I was surprised when Maik made his opinion clear on OpenGL. Surely he must have seen some pro plugins and even free ones that have lovely and useful animations. When I see that sort of thing I always feel a bit sad that I could never make such things. I’m not saying I could compete even if we had OpenGL, but it would be nice to have an opportunity to at least have a go.

I guess on one level he has some sort of point, namely that animations don’t affect the sounds made by synths and FX. But, like in the case of my Hurdy Gurdy crank handle, I think animations do help with engagement and appeal.

But I’m preaching to the choir! :lol:
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Image Processing with Flowstone?

Postby HughBanton » Sun Mar 14, 2021 9:43 pm

But I think what Maik actually said was that, because of Flowstone's modular sandbox format, adding OpenGL the cpu usage could go up by a factor of 1000. Even if he's exaggerating just a bit (which he probably wasn't) that would clearly put OpenGL and the like completely out of bounds for FS. Flowstone and Juce are not the same thing.

As Maik said, "it's just completely inpractical for a Software that allows the user to do whatever they want". Too true - the UK government nearly came seriously unstuck over Covid last year because of MS Excel ..

Mind you, they then went on to [deleted .. HB] :roll:

H

PS Really nice work Martin!
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire

Next

Return to DSP

Who is online

Users browsing this forum: No registered users and 15 guests