It would be nice if there was an option to remove objects from a photo without the need to scale down the image. I know a scale down is needed to do this, but what if we could mask an object to be removed and the image was automatically scaled down just enough to remove that object and then rescaled back to the original size. I realize this might not produce the best results, especially if removing large objects, but it would be a nice option.
I think such a job can be done with Resynthesizer :
Resynthesizer seems to produce results similar to the clone tool, only it's automated. Its seems to me that the use of Liquid Rescale along with masking to preserve and remove objects might produce better results than just covering objects with cloning would.
Yes, it would be a nice feature, but it gives me problems in terms of the interface.
There should be a button to override the size settings, and guess the expected size, and this is not guaranteed to work right since the discard layer is graded (this will be done however).
But then, should we resize vertically or horizontally? Should we resize back with the usual scale or with LqR? What about protection layers, if they're present?
If one starts adding all the options to an extra dialog it becomes just like doing the work by hand, I guess. If one doesn't, the result may well be a disaster.
How about a "Remove object/objects without resize" checkbox near the "Select new width and height" option that disables the width and height options.
Areas that need to be preserved could be masked as usual with the feature preservation mask.Then, using the feature discard mask the photo is scaled down just enough to remove the entire area in the discard masked, no more, no less. The scaling should be horizontal, vertical or both depending on what would be more efficient (least amount of seams removed) and do not affect items that are masked to preserve. When the down scaling and object removal is done, a rescale back to the original size is then done utilizing the feature preservation mask to prevent distorting important areas of the image.
Additionally, you could add the option to restrict scaling to horizontal, vertical or both using radio buttons below the checkbox.
This might take longer to process that a regular liquid rescale, but the only real challenge I can see in doing this would be determining what the optimal method of removing seems would be before rescaling back to the original size. Be it horizontal, vertical or both. I guess one way would be to determine the number of seems removed using each method and then compare. The option that removes the least number of seams wins. Unfortunately that would probably involve processing the image multiple times to determine which method is best.
This is implemented here: http://code.google.com/p/seam-carving-gui/downloads/list
The "Removed Marked" button will remove all negatively weighted areas and then scales the image back out to its original dimensions.
This seam-carving-gui seems to work fine if you only mask an object for removal. However there seems to be some issues with this implementation, when you mask objects to both remove and preserve, it freezes up much of the time. This is true for both the Linux version I compiled from source, and the Windows binary running with WINE. I guess this could be a problem with the CAIR backend it uses.
I still like the idea of object removal with this method and without changing the original image size. Implemented properly, I think it would be a great option for Liquid Rescale GIMP plug-in.
I noticed this as well. The function that handles this is labeled as "experimental," so it needs some work.
It's difficult to make this truly work for all situations. Masking several areas for removal may not mean all areas are removed in one pass and may require several. Also, the user can create situations that make it impossible to resolve, such as surrounding an area to remove with a protected area (this might be what you're experiencing to a lesser extent). The protected area will make it impossible to remove the area marked for removal, but the function still sees an area marked for removal after a pass. Asking the function to determine if a situation like that exists is rather unrealistic (that gets into object recognition and bounds detection), and something un-graceful like forcing no more than two passes seems like the only real solution.
I'm gonna go back and look at this some more (right now I'm not sure if the bug is in CAIR or the gui).
Confirmed, there is a bug in CAIR.
The best solution I can come up with is giving the user the control. Like I said, there is no simple solution to some of the impossible conditions the user may create, so, ultimately it will have to be up to the user to make the judgment call on the situation. Either they could force the algorithm to remove in a direction, limit the amount of attempts, or readjust the weights to allow the algorithm to find a possible solution to the removal. Cloning a portion of the image back over the unremoved section might be a possible crutch to the situation.
Those sound like some good options to give the user. I rather it complete the processing of the image and not remove anything than to completely freeze up. Also, some of the options you mentioned might give the user some workarounds for problematic images.
The new 0.4.0 version of the plugin includes this functionality.