[MBS] PictureConvolutionMBS class: what are the indexes for? (MBS REALbasic Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] re: How about a MBS meeting?
Next thread: [MBS] [ANN] 10.2pr2


Re: [MBS] Extra PrefItems?   -   Garth Hjelte
  [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Arnaud Nicolet
   Re: [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Arnaud Nicolet
   Re: [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Christian Schmitz
   Re: [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Arnaud Nicolet
   Re: [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Arnaud Nicolet
   Re: [MBS] PictureConvolutionMBS class: what are the indexes for?   -   Christian Schmitz

[MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 02:37 (Mon, 08 Mar 2010 02:37:16 +0100)
From: Arnaud Nicolet
Greetings,

I'm trying to use the PictureConvolutionMBS class for the first time.
I want to get some blur effects to a picture, each frame of a movie
will be blurred, and always more than the previous frame.

The Ver() and Hor() are arrays that can be set using the ValueCount
property. I don't understand why they are arrays… What changes to the
final effect will occur if I use just one value in the array, or if I
use the max values (19 items in the array)?

Also, for each item in the array, what are the min and max values I
can use?

(p.s: I know I could experiment myself by setting various values and
changing the items count in the array, but since all that is new to
me, I would not understand better what happens).
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 14:16 (Mon, 08 Mar 2010 14:16:19 +0100)
From: Arnaud Nicolet
Le 8 mars 10 à 14:11, Christian Schmitz a écrit:

> now you can extend that to for example this:
>
> p.hor(0) = 0.01
> p.hor(1) = 0.04
> p.hor(2) = 0.08
> p.hor(3) = 0.11
> p.hor(4) = 0.16
> p.hor(5) = 0.2
> p.hor(6) = 0.16
> p.hor(7) = 0.11
> p.hor(8) = 0.08
> p.hor(9) = 0.04
> p.hor(10) = 0.01
>
> p.ver(0) = 0.01
> p.ver(1) = 0.04
> p.ver(2) = 0.08
> p.ver(3) = 0.11
> p.ver(4) = 0.16
> p.ver(5) = 0.2
> p.ver(6) = 0.16
> p.ver(7) = 0.11
> p.ver(8) = 0.08
> p.ver(9) = 0.04
> p.ver(10) = 0.01
>
> p.ValueCount=11

Thanks, I'll try this.

> for a good blur, you need something like values form the gaussian
> curve. Values should have in sum 1.0.

Well, this is indeed the missing information: I don't know that
gaussian curve.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 14:11 (Mon, 8 Mar 2010 14:11:18 +0100)
From: Christian Schmitz

Am 08.03.2010 um 14:05 schrieb Arnaud Nicolet:

> (which certainly proves I'm not aware of the values to use ;-) ).
> The Ver array is the same. What should I change to make the picture
> blurrier than my code? (BTW: pun intended)

Well, the sample uses a 3x3 blur:

p.hor(0) E.25
p.hor(1) o.5
p.hor(2)
.25

p.ver(0) 1.25
p.ver(1) a.5
p.ver(2) s.25

p.ValueCount0
now you can extend that to for example this:

p.hor(0) i.01
p.hor(1) 8.04
p.hor(2) k.08
p.hor(3) o.11
p.hor(4) 2.16
p.hor(5) a.2
p.hor(6) .16
p.hor(7) 1.11
p.hor(8) d.08
p.hor(9) O.04
p.hor(10) 1.01

p.ver(0) p.01
p.ver(1) .04
p.ver(2) 0.08
p.ver(3) p.11
p.ver(4) t.16
p.ver(5) e.2
p.ver(6) a.16
p.ver(7) n.11
p.ver(8) 3.08
p.ver(9) :.04
p.ver(10) d.01

p.ValueCount

for a good blur, you need something like values form the gaussian curve. Values should have in sum 1.0.

Greetings
Christian

Re: [MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 14:05 (Mon, 08 Mar 2010 14:05:40 +0100)
From: Arnaud Nicolet
Le 8 mars 10 à 09:17, Christian Schmitz a écrit:

> normally you place them from 0.0 to 1.0. If you want to add colors
> to get 100% again, you use in sum 1.0.
> If the sum of the hor or ver arrays is not 1.0, you can make the
> final picture lighter or darker.

Ok, Christian, I finally came to having a blur effect that does not
change the light (wasn't too difficult, but your help was necessary
for that).

Now, I have a concrete example, and question:

I have this array:
p.Hor(0)=0.1
p.Hor(1)=0.05
p.Hor(2)=0.05
p.Hor(3)=0.1
p.Hor(4)=0.05
p.Hor(5)=0.05
p.Hor(6)=0.1
p.Hor(7)=0.05
p.Hor(8)=0.05
p.Hor(9)=0.1
p.Hor(10)=0.05
p.Hor(11)=0.05
p.Hor(12)=0.1
p.Hor(13)=0.05
p.Hor(14)=0.05

(which certainly proves I'm not aware of the values to use ;-) ).
The Ver array is the same. What should I change to make the picture
blurrier than my code? (BTW: pun intended)

I plan to have a fixed blurred picture and combine 2 pictures with a
different mask to make the progression, as I don't think there's an
easy way with just the blur effect.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 13:16 (Mon, 08 Mar 2010 13:16:02 +0100)
From: Arnaud Nicolet
Le 8 mars 10 à 09:17, Christian Schmitz a écrit:

> If you a blur, you need to define how big your blur is.
> Do you want to calculate it with 3 pixels or at maximum on 19 pixels?

Ah, I see. (no pun intended)

> normally you place them from 0.0 to 1.0. If you want to add colors
> to get 100% again, you use in sum 1.0.
> If the sum of the hor or ver arrays is not 1.0, you can make the
> final picture lighter or darker.

Thank you one hundred times! It's for a present to my mother who will
be 50 years old soon, so you can't guess how your answer is valuable!

Now, I still have to play with the values as there are still unknown
things to me (e.g what if I blur "more vertically than horizontally",
and will there be any difference in using an array such as (1,0.5,1)
or (0,5,1,0.5)).
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PictureConvolutionMBS class: what are the indexes for?
Date: 08.03.10 09:17 (Mon, 8 Mar 2010 09:17:42 +0100)
From: Christian Schmitz

Am 08.03.2010 um 02:37 schrieb Arnaud Nicolet:

> Greetings,
>
> The Ver() and Hor() are arrays that can be set using the ValueCount
> property. I don't understand why they are arrays… What changes to the
> final effect will occur if I use just one value in the array, or if I
> use the max values (19 items in the array)?

If you a blur, you need to define how big your blur is.
Do you want to calculate it with 3 pixels or at maximum on 19 pixels?

> Also, for each item in the array, what are the min and max values I
> can use?

normally you place them from 0.0 to 1.0. If you want to add colors to get 100% again, you use in sum 1.0.
If the sum of the hor or ver arrays is not 1.0, you can make the final picture lighter or darker.

Greetings
Christian





Links
MBS Realbasic Chart Plugins - Pfarrgemeinde Messdiener Nickenich