Jump to content

Seam Carving: Plugin Request


davidism

Recommended Posts

I guess you could write a small .exe that worked from a .dll that you used like a paint.NET plugin.

This sound possible. This Greycstoration Beta works the same way (hope the name is correct; btw, is this temporary or vanished it from the plugin board!?).

Link to comment
Share on other sites

This Greycstoration Beta works the same way (hope the name is correct).

No. It's the EVIL Greycstoration plugin.

No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio

Link to comment
Share on other sites

:arrow:

If Google would get their "Don't be evil"-fingers on PDN...

Now, to make this Idea not die out, has anybody "got his fingers" on it? I mean, is there anybody who would be interested in making a beta plugin for testing purposes?

Link to comment
Share on other sites

I mean, is there anybody who would be interested in making a plugin

If I had better C# knowledge, absolutely.

But notice than everybody is starting school or something, so we're all in a rush, but every year (since 3 years OMG OMG) around Nov. or Dec. I try to start learning C# and fail miserably, and this is at the top of my "What can I do to spread the PdN joy to the world" todo-list.

So let me kill... errr I mean get my flat stuff done, pay the local phone provider, discover my new uni, get drunk for my birthday, get paid by my summer job employer, build up my new computer, install Vista and PdN on it[1], and I'm at your disposal.

BTW, as this is totally kool, it will show up multiple times on digg or on some geek blogs in lack of new stuff, so we'll not forget it (I won't, at least).

[1] This list don't include sleeping time, s*x, eating stuff, and drinking beer at any time.

No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio

Link to comment
Share on other sites

Maybe you could see if you can get the source code off of these people and convert it... Just a thought...

I agree. It's really worth a try. :wink:

Link to comment
Share on other sites

the earlier closed thread[/url],":e52f8]Has anyone gotten to work on the "content-aware resizing" for Paint.NET?

Apparently GIMP just got it:

http://arstechnica.com/journals/linux.a...imp-plugin

From the above linked article:

"This transformation is done in about 2 seconds (mainly because of some calculations in pure Python. For most calculations I use the Python Imaging Library and SciPy/NumPy, which are mainly C modules and much faster). As you can see the implementation still needs lots of love," writes Trangez in a blog entry. "The algorithm itself is surprisingly 'simple' and easy to understand, great job by the researchers!" The source code for his implementation is available in a Git repository.

I have no idea what all that means, but what I do understand is that the Git repository link doesn't work, however, the link to the GIMP plugin registry does and it leads to this page, which, if you're having problems downloading, has a further link to this page which has the source code for the plugin.

Basically, the source code for the GIMP plugin can be found here: http://web.tiscali.it/carlobaldassi/

Now, does anyone know how to translate...? There is a Photoshop version of this available but does not have accompanying source code.

Link to comment
Share on other sites

I just didn't get one thing. It basically would disconsider some parts of the image, or would it consider them, normally resize some of them, while keeping the other ones normal?

Something like that Real/Toy Car Conversion?

logoforum3eg4.jpg

I'm BRAZILIAN!

I love Anime Art!

Link to comment
Share on other sites

It looks like it determines the areas with the most detail and changes them as little as possible, changing the un-detailed areas more.

I agree, this would be awesome...

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

  • 2 weeks later...

no need to pay for the source code, there are a couple of different open source solutions already mentioned in this article:

http://www.hackszine.com/blog/archive/2 ... rving.html

Open Source Seam Carving

For those of you who didn't catch our previous post about seam carving, it's a smart image resizing algorithm, invented by Dr. Ariel Shamir and Dr. Shai Avidan. Where you would normally have to choose between cropping or squeezing/stretching an image to change its aspect ratio, the seam carving method will attempt to find horizontal or vertical paths within the image that can be removed without altering "important" parts of the image, such as people or other objects that would look funny if squished.

There are now a couple of open source Actionscript implementations as well as a GIMP plugin that enable you to "liquid rescale" your photos.

I'm thinking that with a few simple tweaks, you could hack one of the Flash versions load a user-specified JPG or PNG and provide an interface for adjusting the image. It'd just be a simple matter of doing a screen capture to pull the result back into the image editor of your choice.

There's also a Photoshop plugin that claims to do this, but it's closed source, unavailable for macs, and the test version doesn't work for images larger than 640x480. To that I say, "Phtfphpht," but I've included a link in case you are interested. To be fair, it's probably cool... I'm just more excited to see the open source versions surfacing.

References:

GIMP Liquid Rescale (lqr) plugin - Link

Content-aware image resizing in Actionscript (Joa Ebert's original source) - Link

Seam carving in Actionscript (Mario Klingemann's optimizations) - Link

Pictual: Photoshop plugin for smart resizing - Link

Seam carving: content-aware image resizing - Link

having this ability in paint.net would be awesome :)

Link to comment
Share on other sites

no they're not - you're very observant.

it's a cut and paste of the main body of the article to save people having to go read the article just in case they're not that interested.

Link to comment
Share on other sites

Given the algorithm is freely available, seeing plugin code for another application will not be useful.

M2cpdhm.

No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio

Link to comment
Share on other sites

no they're not - you're very observant.

it's a cut and paste of the main body of the article to save people having to go read the article just in case they're not that interested.

Yeah, indeed. The sad thing for me is that my poor powers of observation will never match your kindness and maturity by far.

Link to comment
Share on other sites

Hmm... If the algorithm is there, then surely, it wouldn't be an impossible feat to incorporate it into a tool or plugin...

I don't hink we'll get a tool for it. So we should concentrate on a plugin. Would be easier I think, too.

Link to comment
Share on other sites

How would a possible plugin work? I don't see it happening without direct access to the canvas; which plugins can't do.

Well i was thinking that it could use an interface like Octagonal/Quad Reshape/Matte plugin with the dots and the preview thingy

And as a programmer myself I think that using this kind of GUI (Graphical User Interface) it would easier to use the algorithm to calculate the regions on the image and then re-render it on the canvas. Obviously you could always select the transparent left-over and remove it from canvas, either by creating a new image with the previous reduce image size and the posting it, or by using the align object plugin and then reducing the canvas size.

Anyway just a thought

Link to comment
Share on other sites

I guess you could write a small .exe that worked from a .dll that you used like a paint.NET plugin.

To elaborate.

You put the .dll in your paint.net effect folder as per usual. Then when you run the effect with the dll it uses the .exe to talk to the program & resize the image to your required dimensions.

I think this should be the way. Fot the beginning, a simple plugin is enough.

Link to comment
Share on other sites

I guess you could write a small .exe that worked from a .dll that you used like a paint.NET plugin.

To elaborate.

You put the .dll in your paint.net effect folder as per usual. Then when you run the effect with the dll it uses the .exe to talk to the program & resize the image to your required dimensions.

I think this should be the way. Fot the beginning, a simple plugin is enough.

You misunderstand the plugin architecture. Having a separate .EXE will not give a plugin any more power than it would have if it was all in the DLL file. Yes, GREYCstoration uses a separate EXE, but that is only because the author did not want to go to the trouble of copying all the algorithms from the source code to his DLL, when the EXE was already freely available. Much easier. Point is, no matter what files, filetypes, and number of files you're using for a plugin, it's still going to be limited by the plugin architecture that Paint.NET provides.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

You misunderstand the plugin architecture. Having a separate .EXE will not give a plugin any more power than it would have if it was all in the DLL file. Yes, GREYCstoration uses a separate EXE, but that is only because the author did not want to go to the trouble of copying all the algorithms from the source code to his DLL, when the EXE was already freely available. Much easier. Point is, no matter what files, filetypes, and number of files you're using for a plugin, it's still going to be limited by the plugin architecture that Paint.NET provides.

Hmmm... Maybe the planned changes to the plugin system (3.20) will affect this issue in a positive way...?

Link to comment
Share on other sites

I for one am going to pass out from sheer joy when PDN is able to allow plugin authors to do different things with the program, like play with layers and adjustments. :D I was trying to scriptlab Tom Jackson's "fiery text" tut, but there were multiple layers and I got confused. :?

Link to comment
Share on other sites

Hmmm... Maybe the planned changes to the plugin system (3.20) will affect this issue in a positive way...?

Not in this way.

Wait at least for v4. And even there I'm not sure it's planned. Wait and see :)

No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...