Skip to content

Commit

Permalink
Update main (#7)
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
blamacaz authored Jan 14, 2025
1 parent 8b0b0d5 commit d96978a
Show file tree
Hide file tree
Showing 55 changed files with 2,170 additions and 3,447 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,21 @@ jobs:
mkdir -p ${{ github.workspace }}/vcpkg/bincache
fi
shell: bash

- name: Install packages
if: runner.os == 'Linux'
run: sudo apt-get install -y libxi-dev libxtst-dev bison gperf libgles2-mesa-dev libxrandr-dev libxcursor-dev libxdamage-dev libxinerama-dev nasm autoconf automake libtool pkg-config

- if: runner.os == 'macOS'
run: brew install nasm

- uses: lukka/get-cmake@latest

- name: Set up vcpkg
uses: lukka/run-vcpkg@v4
with:
setupOnly: true
vcpkgGitCommitId: 0affe8710a4a5b26328e909fe1ad7146df39d108
vcpkgGitCommitId: d320630b28aeb59b24424eb2a7ef3905314107a1

# Restore vpkg cache
- name: Restore vcpkg
Expand All @@ -73,13 +80,6 @@ jobs:
# Ensure that the developer command promt is present on Windows runners
- uses: ilammy/msvc-dev-cmd@v1

- name: Install packages
if: runner.os == 'Linux'
run: sudo apt-get install -y libxi-dev libxtst-dev bison gperf libgles2-mesa-dev libxrandr-dev libxcursor-dev libxdamage-dev libxinerama-dev nasm

- if: runner.os == 'macOS'
run: brew install nasm

- name: Restore from cache the dependencies and generate project files
run: |
cmake -DBUILD_EXAMPLE_APP=ON -DBUILD_TESTS=ON --preset ${{ env.CURRENT_OS }}-release
Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(PUBLIC_HEADERS
"include/iris/VideoAnalyser.h"
"include/iris/Configuration.h"
"include/iris/Log.h"
"include/iris/FrameData.h"
"include/iris/Result.h"
"include/iris/TotalFlashIncidents.h"
"include/iris/ScopeProfiler.h"
Expand All @@ -45,14 +46,11 @@ set(SOURCE_FILES
"src/RelativeLuminance.cpp"
"src/RedSaturation.h"
"src/RedSaturation.cpp"
"src/CDLuminance.cpp"
"src/Configuration.cpp"
"src/ConfigurationParams.h"
"src/Flash.h"
"src/RelativeLuminance.h"
"src/CDLuminance.h"
"src/FrameRgbConverter.h"
"src/FrameData.h"
"src/FrameRgbConverter.h"
"src/FlashDetection.h"
"src/FlashDetection.cpp"
"src/IrisFrame.h"
Expand All @@ -61,11 +59,13 @@ set(SOURCE_FILES
"src/PatternDetection.cpp"
"src/PhotosensitivityDetector.h"
"src/TransitionTracker.h"
"src/TransitionTrackerByFPS.h"
"src/TransitionTrackerByTime.h"
"src/TransitionTrackerByFPS.cpp"
"src/TransitionTrackerByTime.cpp"
"src/TransitionTracker.cpp"
"src/ScopeProfiler.cpp"
"src/IFrameManager.h"
"src/FpsFrameManager.h"
"src/FpsFrameManager.cpp"
"src/TimeFrameManager.h"
"src/TimeFrameManager.cpp"
)

source_group("Source files" FILES ${SOURCE_FILES})
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ When running IRIS in the example app, the following command line arguments can b
- `-j`: when passing true/1 generates the results in a json file.
- `-v`: the path to a video can be specified as to.
- `-p`: enabled/disable the pattern detection (true/1 or false/0).
- `-l`: specify the luminance type for the luminance calculations (CD || RELATIVE), relative luminance is the default and standard.


## Configuration
The [appsettings.json](config/appsettings.json) is a file where values used by IRIS are defined and can be modified to alter the execution of the analysis. These default values are configured to detect photosensitive content based on publicly available guidelines. IRIS is not intended to guarantee, certify or otherwise validate video content’s photosensitivity compliance. Modifying IRIS’s default values should be done at your own risk, understanding that doing so may impact IRIS’s results and its ability to detect photosensitivity issues.
Expand Down
272 changes: 2 additions & 270 deletions config/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,272 +1,7 @@
{
"Luminance": {
"FormulaYval1": 413.435, //CD luminance formula values
"FormulaYval2": 0.002745,
"FormulaYval3": 0.0189623,
"FormulaYvalpow": 2.2,
"RelativeLuminanceFlashThreshold": 0.1, //flash transition
"RelativeDarkLuminanceThreshold": 0.8,
"CdLuminanceFlashThreshold": 20, //flash transition
"CdDarkLuminanceThreshold": 160,
//possible CD luminanve values for look up table
"CdLuminanceValues": [
0.07,
0.09,
0.12,
0.15,
0.18,
0.22,
0.27,
0.31,
0.37,
0.42,
0.48,
0.55,
0.62,
0.69,
0.77,
0.85,
0.94,
1.03,
1.13,
1.23,
1.34,
1.45,
1.57,
1.69,
1.82,
1.95,
2.09,
2.23,
2.37,
2.53,
2.68,
2.85,
3.01,
3.19,
3.37,
3.55,
3.74,
3.93,
4.13,
4.34,
4.55,
4.77,
4.99,
5.21,
5.45,
5.68,
5.93,
6.18,
6.43,
6.69,
6.96,
7.23,
7.51,
7.79,
8.08,
8.38,
8.68,
8.98,
9.3,
9.61,
9.94,
10.27,
10.6,
10.94,
11.29,
11.64,
12,
12.37,
12.74,
13.12,
13.5,
13.89,
14.28,
14.69,
15.09,
15.51,
15.93,
16.35,
16.78,
17.22,
17.67,
18.12,
18.57,
19.04,
19.5,
19.98,
20.46,
20.95,
21.44,
21.94,
22.45,
22.96,
23.48,
24.01,
24.54,
25.08,
25.62,
26.17,
26.73,
27.29,
27.86,
28.44,
29.02,
29.61,
30.21,
30.81,
31.42,
32.03,
32.66,
33.29,
33.92,
34.56,
35.21,
35.86,
36.53,
37.19,
37.87,
38.55,
39.24,
39.93,
40.63,
41.34,
42.05,
42.78,
43.5,
44.24,
44.98,
45.73,
46.48,
47.24,
48.01,
48.79,
49.57,
50.36,
51.15,
51.95,
52.76,
53.58,
54.4,
55.23,
56.07,
56.91,
57.76,
58.62,
59.48,
60.35,
61.23,
62.11,
63,
63.9,
64.81,
65.72,
66.64,
67.56,
68.5,
69.44,
70.38,
71.34,
72.3,
73.27,
74.24,
75.22,
76.21,
77.21,
78.21,
79.22,
80.24,
81.26,
82.3,
83.34,
84.38,
85.43,
86.49,
87.56,
88.64,
89.72,
90.81,
91.9,
93,
94.11,
95.23,
96.36,
97.49,
98.63,
99.77,
100.93,
102.09,
103.25,
104.43,
105.61,
106.8,
108,
109.2,
110.41,
111.63,
112.86,
114.09,
115.33,
116.58,
117.84,
119.1,
120.37,
121.65,
122.93,
124.22,
125.52,
126.83,
128.14,
129.47,
130.8,
132.13,
133.48,
134.83,
136.19,
137.55,
138.93,
140.31,
141.69,
143.09,
144.49,
145.9,
147.32,
148.75,
150.18,
151.62,
153.07,
154.53,
155.99,
157.46,
158.94,
160.43,
161.92,
163.42,
164.93,
166.45,
167.97,
169.5,
171.04,
172.59,
174.14,
175.7,
177.27,
178.85,
180.43,
182.03,
183.63,
185.23,
186.85,
188.47,
190.1,
191.74,
193.38,
195.04,
196.7,
198.37,
200
]
"RelativeDarkLuminanceThreshold": 0.8
},

"RedSaturation": {
Expand All @@ -277,12 +12,10 @@
"PatternDetection": {
"MinStripes": 6, //min stripes for harmful patterns
"TimeThreshold": 0.5, //max seconds for harmful patterns until failure
"CDDarkLuminanceThreshold": 160,
"RelativeDarkLuminanceThreshold": 0.8,
"AreaProportion": 0.25
},


"FilePersistence": {
"MaxDataStored": 10 //max stored frame data in memory until persistence
},
Expand All @@ -292,7 +25,7 @@
"MinTransitions": 4, //amount of min transitions to add to extended fail count
"ExtendedFailSeconds": 4, //max seconds until the start of extended failure
"ExtendedFailWindow": 5, //seconds in extended fail count window
"AnalyseByTime": false
"WarningTransitions": 4
},

"FlashDetection": {
Expand Down Expand Up @@ -559,7 +292,6 @@
},

"VideoAnalyser": {
"LuminanceType": "RELATIVE", //CD || RELATIVE
"PatternDetectionEnabled": false,
"FrameResizeEnabled": false,
"ResizeFrameProportion": 0.2
Expand Down
Loading

0 comments on commit d96978a

Please sign in to comment.