Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] Image subtraction (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] DynaPDF ImportPageEx question
Next thread: [MBS] [ANN] 12.5pr12


[MBS] PortAudio   -   Garth Hjelte
  [MBS] Image subtraction   -   William Koperwhats
   Re: [MBS] Image subtraction   -   Christian Schmitz
   Re: [MBS] Image subtraction   -   William Koperwhats
   Re: [MBS] Image subtraction   -   Christian Schmitz
   Re: [MBS] Image subtraction   -   William Koperwhats
   Re: [MBS] Image subtraction   -   Christian Schmitz

[MBS] Image subtraction
Date: 30.11.12 19:28 (Fri, 30 Nov 2012 10:28:05 -0800)
From: William Koperwhats
When subtracting images, is there any difference (in speed of operation or results) between using CombineFrameMBS and DiffPicturesMBS? I am attempting to perform near real-time dark frame subtraction on low light level video images.

For example:

Frame As Picture
FrameToSubtract As Picture

Return Frame.CombineMBS(8, FrameToSubract)

or

Return DiffPicturesMBS(Frame, FrameToSubtract, False)

Cheers.

-bill k

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Image subtraction
Date: 01.12.12 11:20 (Sat, 1 Dec 2012 11:20:44 +0100)
From: Christian Schmitz

Am 01.12.2012 um 08:22 schrieb William Koperwhats <<email address removed>>:

>
> That would be a great addition the next time you compile the plugins. Also, a mode to add images, clipping on the upper end (i.e. at 255) would be really useful, not just for me, but for other people doing any sort of scientific image processing.

I add a mode 10 for this.

Greetings
Christian

Re: [MBS] Image subtraction
Date: 01.12.12 08:22 (Fri, 30 Nov 2012 23:22:40 -0800)
From: William Koperwhats

On Nov 30, 2012, at 2:15 PM, Christian Schmitz <<email address removed>> wrote:

>> One thing that I've noticed is that if I subtract a grey area that is *brighter* than the underlying image, rather than leaving a black hole (which is what I would expect), it will actually cause a bright spot, like it was "wrapping around" the color space or something. Can you offer any insight on why this might be?
>
> Well, actually I could add another mode to CombineMBS where you get black if one image pixel value is higher than other.
>

That would be a great addition the next time you compile the plugins. Also, a mode to add images, clipping on the upper end (i.e. at 255) would be really useful, not just for me, but for other people doing any sort of scientific image processing.

Cheers.

-bill k

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Image subtraction
Date: 30.11.12 23:15 (Fri, 30 Nov 2012 23:15:35 +0100)
From: Christian Schmitz

Am 30.11.2012 um 20:37 schrieb William Koperwhats <<email address removed>>:

> So far performance hasn't been a real issue, but I'm more interested in how these two functions achieve their results.

CombineMBS with mode 8 does this:

if (x1>x2)
{
return x1-x2;
}
else
{
return x2-x1;
}

So we compare and return difference for each red, green and blue value.

DiffPicturesMBS on the other hand does make diff of picture and changes sign if needed.

int r=(r1-r2);
int g=(g1-g2);
int b=(b1-b2);

if (r<0) r = -r;
if (g<0) g = -g;
if (b<0) b = -b;

Not sure which one is better.

> One thing that I've noticed is that if I subtract a grey area that is *brighter* than the underlying image, rather than leaving a black hole (which is what I would expect), it will actually cause a bright spot, like it was "wrapping around" the color space or something. Can you offer any insight on why this might be?

Well, actually I could add another mode to CombineMBS where you get black if one image pixel value is higher than other.

Greetings
Christian

Re: [MBS] Image subtraction
Date: 30.11.12 20:37 (Fri, 30 Nov 2012 11:37:50 -0800)
From: William Koperwhats
So far performance hasn't been a real issue, but I'm more interested in how these two functions achieve their results.

One thing that I've noticed is that if I subtract a grey area that is *brighter* than the underlying image, rather than leaving a black hole (which is what I would expect), it will actually cause a bright spot, like it was "wrapping around" the color space or something. Can you offer any insight on why this might be?

-bill k


On Nov 30, 2012, at 11:31 AM, Christian Schmitz <<email address removed>> wrote:

>
> Am 30.11.2012 um 19:28 schrieb William Koperwhats <<email address removed>>:
>
>> When subtracting images, is there any difference (in speed of operation or results) between using CombineFrameMBS and DiffPicturesMBS? I am attempting to perform near real-time dark frame subtraction on low light level video images.
>>
> Well, if performance enough. Both functions have some potential to be optimized.
>
> Greetings
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Image subtraction
Date: 30.11.12 20:31 (Fri, 30 Nov 2012 20:31:31 +0100)
From: Christian Schmitz

Am 30.11.2012 um 19:28 schrieb William Koperwhats <<email address removed>>:

> When subtracting images, is there any difference (in speed of operation or results) between using CombineFrameMBS and DiffPicturesMBS? I am attempting to perform near real-time dark frame subtraction on low light level video images.
>

Well, if performance enough. Both functions have some potential to be optimized.

Greetings
Christian