Jump to content

Triple-mode redundancy artifact removal

Recommended Posts

Hi! Lets say I have 3 (or more) pictures. 1 and 2 are nearly identical, 3rd contains an artifact. It'd be very nifty to have a plugin that can load all three, pick the wrong one of each 3 pixels, throw it out, then use the other 2 to render output. Several questions appear.


1. Is there maybe a plugin like that already?


If not, I'd like to make one that utilizes some sort of voting logic.


2. How should I pick the wrong one? Median?


3. How should I use the remaining ones for output? Average?


I'm asking because I can imagine a situation where, for example, the triplet of pixels is

a ) red, blue and white with a hint of red. Median+average would result in 50% red.

b ) red, blue and white with a hint of blue. Median+average would result in 50% blue.

This could lead to a lot of noise. I want to avoid that if I'm going to make a plugin.


4. How long does it take to write one from scratch?

Edited by Sne
Link to comment
Share on other sites

Try loading each image into separate layers. Set the Blend mode to XOR to see the differences between layers.

The other blend modes should give you plenty of options to blend the layers together. There is also a plugin which extends the types of blend that can be applied (Blend Modes Plus - find it in the Plugin Index - there's a link in my signature).

for writing plugins we recommend CodeLab. You will need some knowledge of C# to use this tool.

Link to comment
Share on other sites

Oh, I don't want to see the differences, though--I just want to erase them. Every Paint.NET operation, and Blend Modes Plus operation, acts on only two layers. I want to analyze 3 at once. I hope it's possible.


So far I've been thinking that from 3 pixels I should simply pick one closest to both remaining ones to smoothen the noise, and add an option to picking two most similar and averaging them to enable sharpening. 

Link to comment
Share on other sites

Effect plugins cannot operate over multiple layers. They get to read or write only to the current layer. Complex plugins sometimes use the clipboard to hold extra data to get around this limitation.

You're probably going to have to analyze the differences between two layers then compare the third in two separate steps.

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.

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...