Skip to content

Commit b0364db

Browse files
ADD: demo autostereogram
1 parent bd0ea92 commit b0364db

File tree

7 files changed

+603
-0
lines changed

7 files changed

+603
-0
lines changed

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Following is a short description of all listed projects
1919
| [3D-Puzzle](miniprojects/3d_puzzle) | Example for depth first search, with tree pruning (in 3D) |
2020
| [Affenpuzzle](miniprojects/Affenpuzzle) | Example for depth first search, with tree pruning |
2121
| [ALT_F2](miniprojects/ALT_F2) | Application starter app with included calculater |
22+
| [Autostereogram](miniprojects/Autostereogram) | Demo to create autostereograms |
2223
| [Bingo](miniprojects/Bingo) | Create and print bingo cards, play the game |
2324
| [Bitverknuepfungen](miniprojects/Bitverknuepfungen) | Program that evaluates boolean operator formulas |
2425
| [Button Tool](miniprojects/Button_Tool)| Program to create graphics with textured texts |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Autosterogram
2+
3+
This demo tries to give the first insights on how to create [autostereograms](https://en.wikipedia.org/wiki/Autostereogram).
4+
5+
The application also provides a displacement test, with which you can try to make the hidden depth image visible. Yet missing is a feature that actually can extract the correct depth map.
6+
7+
![](preview.png)
8+
9+
Features:
10+
- Load a depthmap and create a pixel image
11+
- create a depthmap for a sphere
274 KB
Loading
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<General>
6+
<SessionStorage Value="InProjectDir"/>
7+
<Title Value="project1"/>
8+
<Scaled Value="True"/>
9+
<ResourceType Value="res"/>
10+
<UseXPManifest Value="True"/>
11+
</General>
12+
<BuildModes>
13+
<Item Name="default" Default="True"/>
14+
</BuildModes>
15+
<PublishOptions>
16+
<Version Value="2"/>
17+
<UseFileFilters Value="True"/>
18+
</PublishOptions>
19+
<RunParams>
20+
<FormatVersion Value="2"/>
21+
</RunParams>
22+
<RequiredPackages>
23+
<Item>
24+
<PackageName Value="LCL"/>
25+
</Item>
26+
</RequiredPackages>
27+
<Units>
28+
<Unit>
29+
<Filename Value="project1.lpr"/>
30+
<IsPartOfProject Value="True"/>
31+
</Unit>
32+
<Unit>
33+
<Filename Value="unit1.pas"/>
34+
<IsPartOfProject Value="True"/>
35+
<ComponentName Value="Form1"/>
36+
<HasResources Value="True"/>
37+
<ResourceBaseClass Value="Form"/>
38+
<UnitName Value="Unit1"/>
39+
</Unit>
40+
</Units>
41+
</ProjectOptions>
42+
<CompilerOptions>
43+
<Version Value="11"/>
44+
<SearchPaths>
45+
<IncludeFiles Value="$(ProjOutDir)"/>
46+
<OtherUnitFiles Value="../../Graphik;../../DatenSteuerung;../Sample/OpenGL;../Sample/DatenSteuerung;../Sample/Graphik"/>
47+
</SearchPaths>
48+
<Parsing>
49+
<SyntaxOptions>
50+
<IncludeAssertionCode Value="True"/>
51+
</SyntaxOptions>
52+
</Parsing>
53+
<CodeGeneration>
54+
<Checks>
55+
<IOChecks Value="True"/>
56+
<RangeChecks Value="True"/>
57+
<OverflowChecks Value="True"/>
58+
<StackChecks Value="True"/>
59+
</Checks>
60+
<VerifyObjMethodCallValidity Value="True"/>
61+
</CodeGeneration>
62+
<Linking>
63+
<Debugging>
64+
<UseHeaptrc Value="True"/>
65+
</Debugging>
66+
<Options>
67+
<Win32>
68+
<GraphicApplication Value="True"/>
69+
</Win32>
70+
</Options>
71+
</Linking>
72+
</CompilerOptions>
73+
<Debugging>
74+
<Exceptions>
75+
<Item>
76+
<Name Value="EAbort"/>
77+
</Item>
78+
<Item>
79+
<Name Value="ECodetoolError"/>
80+
</Item>
81+
<Item>
82+
<Name Value="EFOpenError"/>
83+
</Item>
84+
</Exceptions>
85+
</Debugging>
86+
</CONFIG>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
(******************************************************************************)
2+
(* *)
3+
(* Author : Uwe Schächterle (Corpsman) *)
4+
(* *)
5+
(* This file is part of Autostereogram *)
6+
(* *)
7+
(* See the file license.md, located under: *)
8+
(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *)
9+
(* for details about the license. *)
10+
(* *)
11+
(* It is not allowed to change or remove this text from any *)
12+
(* source file of the project. *)
13+
(* *)
14+
(******************************************************************************)
15+
Program project1;
16+
17+
{$MODE objfpc}{$H+}
18+
19+
Uses
20+
{$IFDEF UNIX}
21+
cthreads,
22+
{$ENDIF}
23+
{$IFDEF HASAMIGA}
24+
athreads,
25+
{$ENDIF}
26+
Interfaces, // this includes the LCL widgetset
27+
Forms, Unit1
28+
{ you can add units after this };
29+
30+
{$R *.res}
31+
32+
Begin
33+
RequireDerivedFormResource := True;
34+
Application.Scaled := True;
35+
{$PUSH}{$WARN 5044 OFF}
36+
Application.MainFormOnTaskbar := True;
37+
{$POP}
38+
Application.Initialize;
39+
Application.CreateForm(TForm1, Form1);
40+
Application.Run;
41+
End.
42+
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
object Form1: TForm1
2+
Left = 326
3+
Height = 703
4+
Top = 107
5+
Width = 1580
6+
Caption = 'Form1'
7+
ClientHeight = 703
8+
ClientWidth = 1580
9+
LCLVersion = '4.99.0.0'
10+
OnCreate = FormCreate
11+
object Button1: TButton
12+
Left = 16
13+
Height = 25
14+
Top = 9
15+
Width = 160
16+
Caption = 'Load 3D Depth map'
17+
TabOrder = 0
18+
OnClick = Button1Click
19+
end
20+
object Image1: TImage
21+
Left = 16
22+
Height = 128
23+
Top = 43
24+
Width = 128
25+
Center = True
26+
Proportional = True
27+
Stretch = True
28+
end
29+
object Label1: TLabel
30+
Left = 152
31+
Height = 16
32+
Top = 43
33+
Width = 110
34+
Caption = 'Image Dimensions'
35+
end
36+
object Label2: TLabel
37+
Left = 152
38+
Height = 16
39+
Top = 67
40+
Width = 40
41+
Caption = 'Label2'
42+
end
43+
object Label3: TLabel
44+
Left = 200
45+
Height = 16
46+
Top = 67
47+
Width = 40
48+
Caption = 'Label3'
49+
end
50+
object Button2: TButton
51+
Left = 272
52+
Height = 25
53+
Top = 32
54+
Width = 240
55+
Caption = 'Create Image'
56+
TabOrder = 1
57+
OnClick = Button2Click
58+
end
59+
object Image2: TImage
60+
Left = 272
61+
Height = 90
62+
Top = 64
63+
Width = 90
64+
AutoSize = True
65+
PopupMenu = PopupMenu1
66+
end
67+
object Button3: TButton
68+
Left = 16
69+
Height = 25
70+
Top = 408
71+
Width = 160
72+
Caption = 'Create Sphere.bmp'
73+
TabOrder = 2
74+
OnClick = Button3Click
75+
end
76+
object Image3: TImage
77+
Left = 376
78+
Height = 90
79+
Top = 64
80+
Width = 90
81+
AutoSize = True
82+
PopupMenu = PopupMenu1
83+
end
84+
object ScrollBar1: TScrollBar
85+
Left = 552
86+
Height = 14
87+
Top = 25
88+
Width = 121
89+
PageSize = 0
90+
TabOrder = 3
91+
OnChange = ScrollBar1Change
92+
end
93+
object Label4: TLabel
94+
Left = 552
95+
Height = 16
96+
Top = 7
97+
Width = 85
98+
Caption = 'Displacement:'
99+
end
100+
object Label5: TLabel
101+
Left = 648
102+
Height = 16
103+
Top = 8
104+
Width = 40
105+
Caption = 'Label5'
106+
end
107+
object ScrollBar2: TScrollBar
108+
Left = 336
109+
Height = 14
110+
Top = 9
111+
Width = 121
112+
Max = 12
113+
Min = 8
114+
PageSize = 0
115+
Position = 10
116+
TabOrder = 4
117+
OnChange = ScrollBar2Change
118+
end
119+
object Label6: TLabel
120+
Left = 472
121+
Height = 16
122+
Top = 9
123+
Width = 40
124+
Caption = 'Label6'
125+
end
126+
object Label7: TLabel
127+
Left = 272
128+
Height = 16
129+
Top = 8
130+
Width = 55
131+
Caption = 'Dividings'
132+
end
133+
object Label8: TLabel
134+
Left = 16
135+
Height = 32
136+
Top = 368
137+
Width = 192
138+
Caption = 'If you do not have a depthmap'#10'to load at hand click this button:'
139+
end
140+
object OpenDialog1: TOpenDialog
141+
DefaultExt = '.bmp'
142+
Filter = 'Bitmap|*.bmp|All|*.*'
143+
Left = 63
144+
Top = 20
145+
end
146+
object PopupMenu1: TPopupMenu
147+
Left = 280
148+
Top = 112
149+
object MenuItem1: TMenuItem
150+
Caption = 'Save Image'
151+
OnClick = MenuItem1Click
152+
end
153+
end
154+
object SaveDialog1: TSaveDialog
155+
DefaultExt = '.bmp'
156+
Filter = 'Bitmap|*.bmp|All|*.*'
157+
Left = 280
158+
Top = 176
159+
end
160+
end

0 commit comments

Comments
 (0)