automatic commit - 25-11-2022
This commit is contained in:
2
tools/vision/scripts/bcon.vcs
Normal file
2
tools/vision/scripts/bcon.vcs
Normal file
@@ -0,0 +1,2 @@
|
||||
; Batch Conversion sample
|
||||
bconv_do bconv.ini
|
||||
49
tools/vision/scripts/bconv.ini
Normal file
49
tools/vision/scripts/bconv.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; INI file for Batch Conversion script sample
|
||||
; All parameters shall be in BatchConv section
|
||||
[BatchConv]
|
||||
; SrcPath: Folder where source files are hold
|
||||
SrcPath=H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES
|
||||
|
||||
; SrcMask: mask for files of interest
|
||||
SrcMask=*.*
|
||||
|
||||
; SrcRecurse (0 or 1) if files of interst are to be searched in sub-folders
|
||||
SrcRecurse=1
|
||||
|
||||
; OutputFormat: the 3 letter code for output format (e.g. DEG,GIF,TIF,JPG,PNG,...)
|
||||
OutputFormat=TIF
|
||||
|
||||
; DstPath: folder whare files will be converted to
|
||||
DstPath=H:\PURE_C\PROJECTS\VISION\TEMP
|
||||
|
||||
; ManageSrc: what to do with source file once successfully converted
|
||||
; 0: Do nothing
|
||||
; 1: Remove source
|
||||
; 2: Move source to folder specified by DstMovePath
|
||||
ManageSrc=0
|
||||
|
||||
; DstMovePath: if ManageSrc=2, move source files to this folder
|
||||
DstMovePath=
|
||||
|
||||
; ManageDst: what to do if destination file already exists
|
||||
; 0: Over-write destination file
|
||||
; 1: Cancel conversion
|
||||
ManageDst=0
|
||||
|
||||
; NotCompatibleBehavior: what to do if destination format cannot handle the request (e.g. number of plans not supported)
|
||||
; 0: Dither
|
||||
; 1: Cancel
|
||||
NotCompatibleBehavior=0
|
||||
|
||||
; Resize: resize source if width or height is exceeded
|
||||
; 0: Don't resize
|
||||
; 1: Resize as soon width or height is exceeded
|
||||
Resize=0
|
||||
|
||||
; ResizeWidth: Width from which VISION will resize the image (keeping it proportional)
|
||||
; Only used if Resize=1
|
||||
ResizeWidth=0
|
||||
|
||||
; ResizeHeight: Height from which VISION will resize the image (keeping it proportional)
|
||||
; Only used if Resize=1
|
||||
ResizeHeight=0
|
||||
12
tools/vision/scripts/buggy.vcs
Normal file
12
tools/vision/scripts/buggy.vcs
Normal file
@@ -0,0 +1,12 @@
|
||||
; This script leads to issues on second pass
|
||||
; VISION starts to report incorrect frees/leaks and crashes on exit
|
||||
; The root cause is SPEC512.LDG failing on 3d_512.sps
|
||||
; Fixed now from lp in a private message on http://www.atari-forum.com
|
||||
iprio_set 1,3,2
|
||||
Loop 2
|
||||
cat_create H:\My_Documents\Documents\stimg.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg.vic
|
||||
wait 3000
|
||||
close H:\My_Documents\Documents\stimg.vic
|
||||
Endloop
|
||||
24
tools/vision/scripts/clip.vcs
Normal file
24
tools/vision/scripts/clip.vcs
Normal file
@@ -0,0 +1,24 @@
|
||||
; LDV script sample
|
||||
; Demonstrates how to use clip commands from VCS
|
||||
|
||||
; Open a sample picture for demonstration
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF
|
||||
|
||||
; Select a block on this picture
|
||||
clip_sel H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF 16 16 256 192
|
||||
|
||||
; Copy that block into clipboard
|
||||
clip_copy
|
||||
|
||||
; Paste clipboard to new page (TGA extension does not matter, just specify some format here)
|
||||
clip_pasten H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.TGA
|
||||
|
||||
; We don't need loaded picture anymore
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF nosave
|
||||
|
||||
; Save new image to disk
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.TGA H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.JPG
|
||||
|
||||
; We don't need this image window anymore
|
||||
; Note that image identifier did not change in spite of giving a different name for saving
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.TGA nosave
|
||||
42
tools/vision/scripts/clip_loop.vcs
Normal file
42
tools/vision/scripts/clip_loop.vcs
Normal file
@@ -0,0 +1,42 @@
|
||||
; LDV script sample
|
||||
; Demonstrates automate image operations from a folder
|
||||
; This script take each image from a folder, extract a block
|
||||
; And saves that block as an image file
|
||||
|
||||
; Inside the loop:
|
||||
; current file is accessible via $LFCurrentFile global variable
|
||||
; start folder (parameter#1 of Loop_Folder) is accessible via $LFStartFolder global variable
|
||||
; Global function LFAdjustDest(<start_folder,file,dest_folder>) allows to build destination file
|
||||
; In such a way that it respects original folder hierachy, e.g.:
|
||||
; Assuming LFStartFolder=H:\IMAGES
|
||||
; And $LFCurrentFile=H:\IMAGES\BYPLANES\32\TC32.JPG
|
||||
; Then LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\OPTIMAL) will be H:\OPTIMAL\BYPLANES\32
|
||||
|
||||
; Starts the loop on a folder (not recursing)
|
||||
Loop_Folder H:\PURE_C\PROJECTS\VISION\IMGTEST
|
||||
|
||||
; Open current image file
|
||||
open $LFCurrentFile
|
||||
|
||||
; Select a block on this picture
|
||||
clip_sel $LFCurrentFile 16 16 256 192
|
||||
|
||||
; Copy that block into clipboard
|
||||
clip_copy
|
||||
|
||||
; Paste clipboard to new page using same filename
|
||||
clip_pasten LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\IMGTEST\TEMP)
|
||||
|
||||
; We don't need loaded picture anymore
|
||||
close $LFCurrentFile
|
||||
|
||||
; Save new image to disk (same window name and filename)
|
||||
; Note quality=90;compression=lzw
|
||||
; This is to force JPEG quality to 90 and compression to LZW (TIFF)
|
||||
save LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\IMGTEST\TEMP) LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\IMGTEST\TEMP) quality=90;compression=lzw
|
||||
|
||||
; We don't need this image window anymore
|
||||
close LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\IMGTEST\TEMP)
|
||||
|
||||
; Proceed with next file in the folder
|
||||
Endloop_Folder
|
||||
25
tools/vision/scripts/clip_paste.vcs
Normal file
25
tools/vision/scripts/clip_paste.vcs
Normal file
@@ -0,0 +1,25 @@
|
||||
; LDV script sample
|
||||
; Demonstrates how to use clip command (copy/paste) from VCS
|
||||
|
||||
; Open a sample picture for demonstration
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF
|
||||
|
||||
; Select a block on this picture
|
||||
clip_sel H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF 16 16 256 192
|
||||
|
||||
; Copy that block into clipboard
|
||||
clip_copy
|
||||
|
||||
; Paste clipboard to image at various locations
|
||||
clip_paste H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF 128 128
|
||||
clip_paste H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF 512 512
|
||||
clip_paste H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF 1280 800
|
||||
|
||||
; Save image to disk with new name
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.TIF
|
||||
|
||||
; We don't need this image window anymore
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF nosave
|
||||
|
||||
; Open saved picture to check it's OK
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\CRAP.TIF
|
||||
17
tools/vision/scripts/ddualton.vcs
Normal file
17
tools/vision/scripts/ddualton.vcs
Normal file
@@ -0,0 +1,17 @@
|
||||
; LDV script sample
|
||||
; Using dither.ldv to dither files in a folder to dual tone
|
||||
; Param1: method; auto, 1: matrixmono, 2: grey level, 3: 216 colors, 4: dual tone
|
||||
; Param2: method parameter (only required as threshold for dual tone), -1: default or a number for the percent of max value
|
||||
; Param3: number of planes for output (0 for current resolution)
|
||||
Loop_Folder H:\PURE_C\PROJECTS\VISION\IMGTEST
|
||||
open $LFCurrentFile
|
||||
ldv_do $LFCurrentFile dither.ldv 4 -1 0
|
||||
sleep 800
|
||||
close $LFCurrentFile nosave
|
||||
EndLoop_Folder
|
||||
Loop_Folder I:\2020\10
|
||||
open $LFCurrentFile
|
||||
ldv_do $LFCurrentFile dither.ldv 3 -1 0
|
||||
sleep 800
|
||||
close $LFCurrentFile nosave
|
||||
EndLoop_Folder
|
||||
16
tools/vision/scripts/dfixpal.vcs
Normal file
16
tools/vision/scripts/dfixpal.vcs
Normal file
@@ -0,0 +1,16 @@
|
||||
; LDV script sample
|
||||
; Demonstrates how to optimize images using optimg.ldv
|
||||
; This scripts loops over a folder and recursively start optimg.ldv
|
||||
; On each image found to analyze it and find a better output format
|
||||
; Based on its colors characteristics (e.g. a monochrome image saved
|
||||
; As True Color will end up with a monochrome file, LZW compressed)
|
||||
|
||||
; These images are stored in TC mode but have less than 256 colors
|
||||
; They will be saved as images with fixed palette
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\rgb.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\rgb.tif Falcon
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\17c.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\17c.tif Falcon
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\rgbtc16.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\rgbtc16.tif Falcon
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\17ctc16.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\17ctc16.tif Falcon
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\marbles.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\marbles.tif Falcon
|
||||
; Next one will fail as image has more than 256 colors
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\marbles.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\marbles.tif TIFForceDitherFixedPal256c
|
||||
10
tools/vision/scripts/ibrowser.vcs
Normal file
10
tools/vision/scripts/ibrowser.vcs
Normal file
@@ -0,0 +1,10 @@
|
||||
; Image Browser Scripting
|
||||
ibrw_open I:\tmp\1DSC00629.png
|
||||
Loop 25
|
||||
ibrw_next
|
||||
wait 300
|
||||
Endloop
|
||||
Loop 25
|
||||
ibrw_prev
|
||||
wait 300
|
||||
Endloop
|
||||
38
tools/vision/scripts/img_prio.vcs
Normal file
38
tools/vision/scripts/img_prio.vcs
Normal file
@@ -0,0 +1,38 @@
|
||||
; Image Priorities control
|
||||
iprio_set 1,3,2
|
||||
cat_create H:\My_Documents\Documents\stimg132.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg12.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\others\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg12.vic
|
||||
wait 3000
|
||||
|
||||
iprio_set 3,2,1
|
||||
cat_create H:\My_Documents\Documents\stimg321.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg21.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\others\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg21.vic
|
||||
wait 3000
|
||||
|
||||
iprio_set 3
|
||||
cat_create H:\My_Documents\Documents\stimg3.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg2.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\others\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg2.vic
|
||||
wait 3000
|
||||
|
||||
iprio_set 2
|
||||
cat_create H:\My_Documents\Documents\stimg2.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg2.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\others\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg2.vic
|
||||
wait 3000
|
||||
|
||||
iprio_set 1
|
||||
cat_create H:\My_Documents\Documents\stimg1.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg1.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\others\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg1.vic
|
||||
|
||||
wait 60000
|
||||
|
||||
|
||||
close H:\My_Documents\Documents\stimg1.vic
|
||||
close H:\My_Documents\Documents\stimg2.vic
|
||||
close H:\My_Documents\Documents\stimg3.vic
|
||||
close H:\My_Documents\Documents\stimg321.vic
|
||||
close H:\My_Documents\Documents\stimg132.vic
|
||||
10
tools/vision/scripts/ldv.vcs
Normal file
10
tools/vision/scripts/ldv.vcs
Normal file
@@ -0,0 +1,10 @@
|
||||
; LDV script sample
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png rotate.ldv 45
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png bhole.ldv 250 50 50
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png gamma.ldv 150 50 100
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png pixel.ldv 3
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png xwave.ldv 80 60
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png ywave.ldv 100 80
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png ypersc.ldv 300 50
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png bw.ldv
|
||||
20
tools/vision/scripts/ldvcnt.vcs
Normal file
20
tools/vision/scripts/ldvcnt.vcs
Normal file
@@ -0,0 +1,20 @@
|
||||
; LDV script sample for CNTCOL.LDV
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 1 H:\marbles1.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 2 H:\marbles2.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 3 H:\marbles3.txt
|
||||
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 1 H:\rwhite1.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 2 H:\rwhite2.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 3 H:\rwhite3.txt
|
||||
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 1 H:\spng1.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 2 H:\spng2.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 3 H:\spng3.txt
|
||||
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 1 H:\16m1.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 2 H:\16m2.txt
|
||||
ldv_do H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 3 H:\16m3.txt
|
||||
20
tools/vision/scripts/ldvcntf.vcs
Normal file
20
tools/vision/scripts/ldvcntf.vcs
Normal file
@@ -0,0 +1,20 @@
|
||||
; LDV script sample for CNTCOL.LDV
|
||||
; This one is working directly from the image file
|
||||
; So it does not depend on the number of planes of the screen
|
||||
; Remember VISION always works with images wih same number of planes than the screen
|
||||
; As soon image is displayed/grapihcal tools used
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 1 H:\marbles1.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 2 H:\marbles2.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\MARBLES.TGA cntcol.ldv 3 H:\marbles3.txt
|
||||
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 1 H:\rwhite1.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 2 H:\rwhite2.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\rwhite.TGA cntcol.ldv 3 H:\rwhite3.txt
|
||||
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 1 H:\spng1.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 2 H:\spng2.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_10mbmb.png cntcol.ldv 3 H:\spng3.txt
|
||||
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 1 H:\16m1.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 2 H:\16m2.txt
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\16m.tif cntcol.ldv 3 H:\16m3.txt
|
||||
10
tools/vision/scripts/ldvf.vcs
Normal file
10
tools/vision/scripts/ldvf.vcs
Normal file
@@ -0,0 +1,10 @@
|
||||
; LDV script sample
|
||||
; Dummy test as -f: instructs LDV will work from the original file so no display
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png rotate.ldv 45
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png bhole.ldv 250 50 50
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png gamma.ldv 150 50 100
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png pixel.ldv 3
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png xwave.ldv 80 60
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png ywave.ldv 100 80
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png ypersc.ldv 300 50
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png bw.ldv
|
||||
6
tools/vision/scripts/ldvini.vcs
Normal file
6
tools/vision/scripts/ldvini.vcs
Normal file
@@ -0,0 +1,6 @@
|
||||
; LDV script sample
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_1mbmb.png
|
||||
ldv_doip H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_1mbmb.png rotate.ldv protate.ini
|
||||
ldv_doip H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_1mbmb.png puzzle.ldv ppuzzle.ini
|
||||
ldv_doip H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_1mbmb.png invert.ldv pinvert.ini
|
||||
ldv_doip H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_1mbmb.png light.ldv plight.ini
|
||||
33
tools/vision/scripts/ldvopt.vcs
Normal file
33
tools/vision/scripts/ldvopt.vcs
Normal file
@@ -0,0 +1,33 @@
|
||||
; LDV script sample
|
||||
; Demonstrates how to optimize images using optimg.ldv
|
||||
; This scripts loops over a folder and recursively start optimg.ldv
|
||||
; On each image found to analyze it and find a better output format
|
||||
; Based on its colors characteristics (e.g. a monochrome image saved
|
||||
; As True Color will end up with a monochrome file, LZW compressed)
|
||||
|
||||
; Inside the loop:
|
||||
; current file is accessible via $LFCurrentFile global variable
|
||||
; start folder (parameter#1 of Loop_Folder) is accessible via $LFStartFolder global variable
|
||||
; Global function LFAdjustDest(<start_folder,file,dest_folder>) allows to build destination file
|
||||
; In such a way that it respects original folder hierachy, e.g.:
|
||||
; Assuming LFStartFolder=H:\IMAGES
|
||||
; And $LFCurrentFile=H:\IMAGES\BYPLANES\32\TC32.JPG
|
||||
; Then LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\OPTIMAL) will be H:\OPTIMAL\BYPLANES\32
|
||||
|
||||
; Call optimg.ldv as follows:
|
||||
; ldv_do -f:<file> optimg.ldv <destination folder or file> <Profile>
|
||||
; <file>: filename of the file (full path recommended)
|
||||
; <destination folder or file>: if folder, LDV will build filename based on original file name extension decided by profile
|
||||
; if file, only extension will be changed
|
||||
;Loop_Folder H:\PURE_C\PROJECTS\VISION\IMGTEST recurse
|
||||
Loop_Folder H:\tmp\axa\05 recurse
|
||||
;ldv_do -f:$LFCurrentFile optimg.ldv LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\PURE_C\PROJECTS\VISION\TEMP\Aranym) DualToneLikely
|
||||
ldv_do -f:$LFCurrentFile optimg.ldv LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\tmp\axa\opt\05) DualToneLikely
|
||||
Endloop_Folder
|
||||
|
||||
|
||||
; Other examples:
|
||||
;ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\Falcon Falcon
|
||||
;ldv_do -f:H:\tmp\z\39\aquila-002.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\aquila-002.tif DualToneLikely
|
||||
;ldv_do -f:H:\tmp\z\39\aquila-003.tif optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\aquila-003.tif DualToneLikely
|
||||
; --> Will generate H:\PURE_C\PROJECTS\VISION\TEMP\ST\MARBLES.JPG (assuming MARBLES.TIF is a TC24 image)
|
||||
5
tools/vision/scripts/ldvopt256c.vcs
Normal file
5
tools/vision/scripts/ldvopt256c.vcs
Normal file
@@ -0,0 +1,5 @@
|
||||
; LDV Dither to 256 colors using optimg.ldv
|
||||
; We are using optimg.ldv and not dither.ldv because
|
||||
; dither.ldv can't save the file
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_5mbmb.png optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\SamplePNGImage_5mbmb.tif TIFForceDither256c
|
||||
ldv_do -f:H:\PURE_C\PROJECTS\VISION\IMGTEST\PNG\3\SamplePNGImage_3mbmb.png optimg.ldv H:\PURE_C\PROJECTS\VISION\TEMP\SamplePNGImage_3mbmb.img IMGForceDither256c
|
||||
21
tools/vision/scripts/lloopfol.vcs
Normal file
21
tools/vision/scripts/lloopfol.vcs
Normal file
@@ -0,0 +1,21 @@
|
||||
; Load/close images from a folder
|
||||
; Command:
|
||||
; Loop_Folder <Folder to parse> [<mask>] [recurse]
|
||||
; Inside the loop:
|
||||
; current file is accessible via $LFCurrentFile global variable
|
||||
; start folder (parameter#1 of Loop_Folder) is accessible via $LFStartFolder global variable
|
||||
; Global function LFAdjustDest(<start_folder,file,dest_folder>) allows to build destination file
|
||||
; In such a way that it respect original folder hierachy, e.g.:
|
||||
; LFStartFolder=H:\IMAGES
|
||||
; $LFCurrentFile=H:\IMAGES\BYPLANES\32\TC32.JPG
|
||||
; LFAdjustDest($LFStartFolder,$LFCurrentFile,H:\OPTIMAL) will be H:\OPTIMAL\BYPLANES\32
|
||||
|
||||
form_silent
|
||||
prog_silent
|
||||
Loop_Folder H:\PURE_C\PROJECTS\VISION\IMGTEST recurse
|
||||
open $LFCurrentFile
|
||||
sleep 100
|
||||
close $LFCurrentFile
|
||||
Endloop_Folder
|
||||
form_silent 0
|
||||
prog_silent 0
|
||||
13
tools/vision/scripts/loadloop.vcs
Normal file
13
tools/vision/scripts/loadloop.vcs
Normal file
@@ -0,0 +1,13 @@
|
||||
; Image Priorities control
|
||||
form_silent
|
||||
iprio_set 1,3,2
|
||||
Loop 200
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\img\04\yel.img
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\sttt\teststtt.img
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\ventura\16color.img
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\img\04\yel.img
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\ventura\16color.img
|
||||
;close H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\timg\fsnap32k.img
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gem_image\sttt\teststtt.img
|
||||
Endloop
|
||||
form_silent 0
|
||||
67
tools/vision/scripts/main.vcs
Normal file
67
tools/vision/scripts/main.vcs
Normal file
@@ -0,0 +1,67 @@
|
||||
; This is a VISION Command Script example
|
||||
; Used to automate actions in VISION
|
||||
; Global Syntax:
|
||||
; - Each line represents a command to execute
|
||||
; - A command may or may not have parameters
|
||||
; - Some parameters are mandatory (between <>) or optional (between [])
|
||||
; - if <filename> has a space character, surround it par quote character "
|
||||
; Available commands are:
|
||||
; ';' : Comment line, ignored for processing
|
||||
; 'open' : opens a file just as File->Open menu
|
||||
; Syntax: open <filename>
|
||||
; Comment:
|
||||
; 'close' : closes a window (image or catalog)
|
||||
; Syntax: close <filename> [nosave]
|
||||
; Comment:
|
||||
; 'wait' : Wait some time before running the next command
|
||||
; Syntax: wait <number of millseconds>
|
||||
; Comment: Don't expect much accuracy here sleep keyword can be used also
|
||||
; 'loop': start a loop
|
||||
; Syntax: loop <number of iterations>
|
||||
; Comment:
|
||||
; 'endloop': ends a loop
|
||||
; Syntax: endloop
|
||||
; Comment:
|
||||
; 'quit' : Quit VISION just as File->Quit
|
||||
; Syntax: quit
|
||||
; Comment: exit keyword can also be used
|
||||
; 'run_script' : runs a new script from the current one
|
||||
; Syntax: run_script <filename>
|
||||
; Comment: filename can be a full pathname or relative to the path or the current script
|
||||
; 'cat_create' : Create a new catalog file and opens it
|
||||
; Syntax: cat_create <filename>
|
||||
; Comment:
|
||||
; 'cat_addfile' : Adds an image file to an existing catalog
|
||||
; Syntax: cat_create <catalog filename> <filename of image to add>
|
||||
; Comment: <catalog filename> must have been created/opened previously with cat_create or open
|
||||
; 'cat_addfolder' : Adds a folder of image files to an existing catalog
|
||||
; Syntax: cat_addfolder <catalog filename> <folder of image to add> [recurse]
|
||||
; Comment: <catalog filename> must have been created/opened previously with cat_create or open
|
||||
; recurse is an optional parameter, if present all images files into sub-folders will be added
|
||||
; 'cat_openwicon' : Opens the window icon album from the album window dialog
|
||||
; Syntax: cat_openwicon <catalog filename>
|
||||
; Comment: <catalog filename> must have been created/opened previously with cat_create or open
|
||||
; This window can be closed by using command close Walb_<catalog filename>
|
||||
; 'cat_setini' : Associates an INI file to a catalog et applies it
|
||||
; Syntax: cat_setini <catalog filename> <ini file>
|
||||
; Comment: <catalog filename> must have been created/opened previously with cat_create or open
|
||||
; 'ibrw_open' : Opens a file into Image Browser to nagigate through its folder
|
||||
; Syntax: ibrw_open <filename>
|
||||
; Comment:
|
||||
; 'ibrw_next' : Opens next file in Image Browser folder
|
||||
; Syntax: ibrw_next
|
||||
; Comment:
|
||||
; 'ibrw_prev' : Opens previous file in Image Browser folder
|
||||
; Syntax: ibrw_prev
|
||||
; Comment:
|
||||
|
||||
cat_create H:\My_Documents\Documents\stest.vic
|
||||
cat_setini H:\My_Documents\Documents\stest.vic H:\My_Documents\Documents\photos.ini
|
||||
cat_addfolder H:\My_Documents\Documents\stest.vic I:\2019\03\*.*
|
||||
cat_addfolder H:\My_Documents\Documents\stest.vic I:\2017\2017-10\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stest.vic
|
||||
;wait 2000
|
||||
;close Walb_H:\My_Documents\Documents\stest.vic
|
||||
;wait 1000
|
||||
;close H:\My_Documents\Documents\stest.vic
|
||||
|
||||
25
tools/vision/scripts/muchram.vcs
Normal file
25
tools/vision/scripts/muchram.vcs
Normal file
@@ -0,0 +1,25 @@
|
||||
; muchram.vcs
|
||||
; Load many modules to have some RAM usage for them and
|
||||
; Try to load a BIG picture to check modules are unloaded
|
||||
; Do not try all folders under ST-Picture-Formats\samples
|
||||
; As IMG.LDG module has a bug, don't go through gem_images
|
||||
cat_create H:\My_Documents\Documents\tst.vic
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\degas\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\deluxe_paint\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\apex_media\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\falcon_tc\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\crackart\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\gfa_raytrace\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\imagelab\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\neochrome\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\misc\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\pixart\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\spectrum\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\computereyes\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\tst.vic
|
||||
wait 3000
|
||||
close Walb_H:\My_Documents\Documents\tst.vic
|
||||
open I:\Demoscene.jpg
|
||||
open I:\Demoscene1.jpg
|
||||
13
tools/vision/scripts/muchram2.vcs
Normal file
13
tools/vision/scripts/muchram2.vcs
Normal file
@@ -0,0 +1,13 @@
|
||||
; muchram2.vcs
|
||||
; Load many modules to have some RAM usage for them and
|
||||
; Try to load a BIG picture to check modules are unloaded
|
||||
; Assuming IMG.LDG module does not corrupt memory when ientifying fsnap32k.img
|
||||
cat_create H:\My_Documents\Documents\tst.vic
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\TGA\*.* recurse
|
||||
cat_addfolder H:\My_Documents\Documents\tst.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\tst.vic
|
||||
wait 3000
|
||||
close Walb_H:\My_Documents\Documents\tst.vic
|
||||
open I:\Demoscene.jpg
|
||||
open I:\Demoscene1.jpg
|
||||
8
tools/vision/scripts/opnsav.vcs
Normal file
8
tools/vision/scripts/opnsav.vcs
Normal file
@@ -0,0 +1,8 @@
|
||||
; LDV script sample
|
||||
; Demonstrates how to open/save images with saving options
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF H:\PURE_C\PROJECTS\VISION\IMGTEST\mtest.tga
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF H:\PURE_C\PROJECTS\VISION\IMGTEST\mtest.tif compression=lzw;byteorder=intel
|
||||
; next line does not support all these options, you will see some info in vision.log about that but file is still saved
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF H:\PURE_C\PROJECTS\VISION\IMGTEST\mtest2.tga quality=80;flipflop=2;byteorder=motorola
|
||||
save H:\PURE_C\PROJECTS\VISION\IMGTEST\MARBLES.TIF H:\PURE_C\PROJECTS\VISION\IMGTEST\mtest.jpg quality=50
|
||||
87
tools/vision/scripts/photos.ini
Normal file
87
tools/vision/scripts/photos.ini
Normal file
@@ -0,0 +1,87 @@
|
||||
; First start with categories that won't stop processing
|
||||
; Cont = 1 means if match continue with other Lookxx
|
||||
; There can be up to 50 Lookxx from Look00 to Look49
|
||||
[Look0]
|
||||
Path=[corse]
|
||||
Cat2=Corse
|
||||
Continue=1
|
||||
|
||||
[Look1]
|
||||
Path=[paris]
|
||||
Cat2=Paris
|
||||
Continue=1
|
||||
|
||||
[Look3]
|
||||
Path=[hawai]
|
||||
Cat2=Hawai
|
||||
Continue=1
|
||||
|
||||
[Look4]
|
||||
Path=[mazamet]
|
||||
Cat2=Mazamet
|
||||
Continue=1
|
||||
|
||||
[Look5]
|
||||
Path=[rome]
|
||||
Cat2=Rome
|
||||
Continue=1
|
||||
|
||||
[Look6]
|
||||
Path=[old]
|
||||
Cat2=Ancien
|
||||
Continue=1
|
||||
|
||||
[Look7]
|
||||
Path=[imgtest]
|
||||
Cat2=TestSample
|
||||
Continue=1
|
||||
|
||||
; Then those for which when there is a match
|
||||
; Procesing will stop there as these categories are exclusive
|
||||
[Look10]
|
||||
Path=I:\200?\*.*
|
||||
Cat1=2005-2009
|
||||
|
||||
[Look11]
|
||||
Path=I:\2010\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look12]
|
||||
Path=I:\2011\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look13]
|
||||
Path=I:\2012\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look14]
|
||||
Path=I:\2013\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look15]
|
||||
Path=I:\2014\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look16]
|
||||
Path=I:\2015\*.*
|
||||
Cat1=2010-2015
|
||||
|
||||
[Look17]
|
||||
Path=I:\2016\*.*
|
||||
Cat1=2016-2020
|
||||
|
||||
[Look18]
|
||||
Path=I:\2017\*.*
|
||||
Cat1=2016-2020
|
||||
|
||||
[Look19]
|
||||
Path=I:\2018\*.*
|
||||
Cat1=2016-2020
|
||||
|
||||
[Look20]
|
||||
Path=I:\2019\*.*
|
||||
Cat1=2016-2020
|
||||
|
||||
[Look21]
|
||||
Path=I:\2020\*.*
|
||||
Cat1=2016-2020
|
||||
5
tools/vision/scripts/pinvert.ini
Normal file
5
tools/vision/scripts/pinvert.ini
Normal file
@@ -0,0 +1,5 @@
|
||||
[LDVParams]
|
||||
x1=70%
|
||||
x2=90%
|
||||
y1=10%
|
||||
y2=30%
|
||||
10
tools/vision/scripts/plight.ini
Normal file
10
tools/vision/scripts/plight.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[LDVParams]
|
||||
x1=70%
|
||||
x2=95%
|
||||
y1=65%
|
||||
y2=90%
|
||||
|
||||
Parameter1=100
|
||||
Parameter2=100
|
||||
Parameter3=50
|
||||
Parameter4=110
|
||||
9
tools/vision/scripts/ppuzzle.ini
Normal file
9
tools/vision/scripts/ppuzzle.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[LDVParams]
|
||||
x1=10%
|
||||
x2=30%
|
||||
y1=70%
|
||||
y2=90%
|
||||
|
||||
Parameter1=20
|
||||
Parameter2=15
|
||||
Parameter3=20
|
||||
7
tools/vision/scripts/protate.ini
Normal file
7
tools/vision/scripts/protate.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
[LDVParams]
|
||||
x1=40%
|
||||
x2=60%
|
||||
y1=40%
|
||||
y2=60%
|
||||
|
||||
Parameter1=45
|
||||
2
tools/vision/scripts/readme.txt
Normal file
2
tools/vision/scripts/readme.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Please take these scripts as educational samples; they are very depending on my own configuration.
|
||||
This is just to give you an idea of how VISION scripting works, they are not intended to be working in general as image file location is surely not identical.
|
||||
6
tools/vision/scripts/s0.vcs
Normal file
6
tools/vision/scripts/s0.vcs
Normal file
@@ -0,0 +1,6 @@
|
||||
; Catalog all ST images
|
||||
cat_create H:\My_Documents\Documents\s0.vic
|
||||
cat_addfile H:\My_Documents\Documents\s0.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\BYPLANES\32\XING_B32.TGA
|
||||
cat_openwicon H:\My_Documents\Documents\s0.vic
|
||||
wait 5000
|
||||
close H:\My_Documents\Documents\s0.vic
|
||||
8
tools/vision/scripts/s1.vcs
Normal file
8
tools/vision/scripts/s1.vcs
Normal file
@@ -0,0 +1,8 @@
|
||||
; Catalog all ST images
|
||||
Loop 2
|
||||
cat_create H:\My_Documents\Documents\stimg.vic
|
||||
cat_addfolder H:\My_Documents\Documents\stimg.vic H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\*.* recurse
|
||||
cat_openwicon H:\My_Documents\Documents\stimg.vic
|
||||
wait 3000
|
||||
close H:\My_Documents\Documents\stimg.vic
|
||||
Endloop
|
||||
5
tools/vision/scripts/spec512.vcs
Normal file
5
tools/vision/scripts/spec512.vcs
Normal file
@@ -0,0 +1,5 @@
|
||||
iprio_set 1,3,2
|
||||
Loop 2000
|
||||
open H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\spectrum\unispec\3d_512.sps
|
||||
close H:\PURE_C\PROJECTS\VISION\IMGTEST\ST-Picture-Formats\samples\spectrum\unispec\3d_512.sps
|
||||
Endloop
|
||||
Reference in New Issue
Block a user