Realtime image processing

Blitz3D Forums/Blitz3D Userlibs/Realtime image processing

ZJP(Posted 2004) [#1]
Hi,

I make some functions and dll for realtime image processing. More than 50 effects.
Based on Image Styles ( Paurex www.paurex.com ) and ISL.DLL.
Run with or without ISF's scripts

Features of ISL Scripts :

- Very small Image Styles script file size (*.isf).
- The most complex files occupy about 500 bytes.
- Now possible to use textures and images with big sizes!
- Fast image generation.
- New method of image generation allows increase the render speed.
- About 60 different effects.
- All effects make wonderful results.
- Seamless and standart image generation algorithms.
- You may create textures and images in one time.
- Enormous amount of image variants.

The library contains an unique technology of random image generation

Download here http://www.zinfo972.net/avatar/blitz_isl.zip

exemples :




Sorry. Poor english. I'm a french people.

@+


fredborg(Posted 2004) [#2]
This is awesome!

Fantastic!

Excellent!


Big&(Posted 2004) [#3]
Really, really nice...


BlitzSupport(Posted 2004) [#4]
Yeah, excellent stuff.


koekjesbaby(Posted 2004) [#5]
from the paurex website:
You may freely use ISL in your freeware games/demos/etc.


sadly it's not free.


jhocking(Posted 2004) [#6]
I haven't tested this yet, but is it fast enough for processing frames being rendered? In other words, for applying image effects to 3D rendering in real-time?


OverDozing(Posted 2004) [#7]
Looks good !


Tom(Posted 2004) [#8]
Cool stuff! Thanks.


ZJP(Posted 2004) [#9]
Hi,

Thanks
@+


Bouncer(Posted 2004) [#10]
Great job... This is very nice indeed. thanks.


ZJP(Posted 2004) [#11]
>jhocking, yes for realtime. See Isl_demo3.BB . Do not forget this : direct acces to Blitz's buffers with this DLL.
But I have find a problem with function ISL_ExecuteScriptOnImage (a memory release pb). Identical in c++ and VB. I'm sending a mail to Paurex Support. Wait and See.
So, the isl_demo2.bb is very significant. It proves that ALL scripts of Image Styles are usable under Blitz
@+

I think with the direct acces to the buffers , Blitz's gurus will find a solution for ISL_ExecuteScriptOnImage ;)


ZJP(Posted 2004) [#12]
Hi,
Answer of Paurex's Support

" Thank you. We have fixed this bug in ISL v2.5.".

Awesome, they are really fast. ;)

@+


elseano(Posted 2004) [#13]
I get an error: "Function 'Blzpeekint' not found"....why?


Ziltch(Posted 2004) [#14]
Thanks


ZJP(Posted 2004) [#15]
elseano > Do not forget,put the .Decls and .DLL files in the Blitz's userlib directory.

@+

Which is your Blitz's version ?


ZJP(Posted 2004) [#16]
Hi,

New version of ISL.DLL (2.5) .www.paurex.com. The ISL_ExecuteScriptOnImage function works well. No memory release pb.
Update of isl here http://www.paurex.com/?products&prod=isl


@+


ZJP(Posted 2006) [#17]
Hi,

I'm suprised. Works well with another pictures size. Not only with 256*256.

JP

; Blitz3D ISL  DEMO 1
;+++++++++++++++++++++++++++++++++++++++++++
; No optimized. I'm not a Blitz Guru. ;)
;+++++++++++++++++++++++++++++++++++++++++++
Graphics3D 800,600,32,0
; Include after graphics mode
;+++++++++++++++++++++++++++
Include "ISL_INC.BB"
;+++++++++++++++++++++++++++
ISL_Initialize() ; init the library
;+++++++++++++++++++++++++++

Global image = LoadImage("f_oeil5.jpg") ; 800x600
Global save = CopyImage(image)
Global buffer_image = ImageBuffer(image)
Global buffer_save = ImageBuffer(save)

WritePixel 0,0,0,buffer_image ;init the image buffer !?!
WritePixel 0,0,0,buffer_save  ;init the save buffer !?!

; Peeks Functions works well with Blitz 1.86 version. <<<<<<< BE CAREFUL <<<<<<<<<<<<<<<<<<<
width    = BLZPeekInt(buffer_image+92); buffer_image+28 for Blitz+ not tested !!
height   = BLZPeekInt(buffer_image+96); buffer_image+32
adrvideo = BLZPeekInt(buffer_image+72); buffer_image+76

SetBuffer FrontBuffer()

effect$="SINE_DISTORTION"
ISL_LoadScriptFromMemory(adr_SINE_DISTORTION) ; Load the filter BUMP whit this address data
Gosub on_screen ; Need Gosub. why ? Blitz's guru response?. No Function here !!!!

effect$="FRACTAL_PLASMA"
ISL_LoadScriptFromMemory(adr_FRACTAL_PLASMA) ; another script
Gosub on_screen

effect$="PINCH"
ISL_LoadScriptFromMemory(adr_PINCH) ; here too
Gosub on_screen

effect$="INVERSION"
ISL_LoadScriptFromMemory(adr_INVERSION) ; etc.. etc..
Gosub on_screen

effect$="BORDER"
ISL_LoadScriptFromMemory(adr_BORDER) ; etc.. etc..
Gosub on_screen

effect$="GRADIENT_MAP"
ISL_LoadScriptFromMemory(adr_GRADIENT_MAP) ; etc.. etc..
Gosub on_screen

effect$="COLORIZE"
ISL_LoadScriptFromMemory(adr_COLORIZE) ; etc.. etc..
Gosub on_screen

effect$="THRESHOLD"
ISL_LoadScriptFromMemory(adr_THRESHOLD) ; etc.. etc..
Gosub on_screen

effect$="NOISE"
ISL_LoadScriptFromMemory(adr_NOISE) ; etc.. etc..
Gosub on_screen

effect$="PLASMA"
ISL_LoadScriptFromMemory(adr_PLASMA) ; etc.. etc..
Gosub on_screen

effect$="MOTION_BLUR"
ISL_LoadScriptFromMemory(adr_MOTION_BLUR) ; etc.. etc..
Gosub on_screen

effect$="ROTATE" ; my rotate default value is set to 45. for modif  ISL_SetEffectValue%(0,4,rnd(-360,360))
ISL_LoadScriptFromMemory(adr_ROTATE) ; etc.. etc..
Gosub on_screen

effect$="CIRCLES"
ISL_LoadScriptFromMemory(adr_CIRCLES) ; etc..
Gosub on_screen

; modification of one parameter
CopyRect 0,0,800,600,0,0,buffer_save,buffer_image
ISL_SetEffectValue%(0,6,15) ; filter 0 (always), param 6 (Maximun Radius)
ISL_ExecuteScriptOnImage(adrvideo,width,height)
DrawBlock image, 0,0
Text 300,290,"Filter "+effect$+" AND RADIUS MODIFICATION"
WaitKey
ISL_Finish() ; Close the library

End

.on_screen
	Cls
	; Backup the original .Without this line 'mixing' effects... Good, very good
	CopyRect 0,0,800,600,0,0,buffer_save,buffer_image
	; call the filter with the adr of the buffer bmp, this width and this height
	ISL_ExecuteScriptOnImage(adrvideo,width,height) ; Run the script. (the filter. because only ONE filter by script)
	Color 255,0,0
	DrawBlock image,0,0
	Text 5,5,"Filter "+effect$
	Text 5,20,"Press a key"
	WaitKey
Return


Last edited 2012


Panno(Posted 2006) [#18]
well this is ähm -!cool!-


Sir Gak(Posted 2006) [#19]
fantastique!


CopperCircle(Posted 2007) [#20]
Anyone got this to work with Blitz+?


ZJP(Posted 2007) [#21]
Try with these parameter. Not tested. No Blitz+'s license

width = BLZPeekInt(buffer_image+28)
height = BLZPeekInt(buffer_image+32)
adrvideo = BLZPeekInt(buffer_image+76)


CopperCircle(Posted 2007) [#22]
Thanks ZJP, I did try those offsets, but no luck.