-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2251 from alicevision/dev/addCameraColorSpaces
Add camera color spaces
- Loading branch information
Showing
12 changed files
with
153 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
COLORSPACES = ["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "Linear ARRI Wide Gamut 3", | ||
"ARRI LogC3 (EI800)", "Linear ARRI Wide Gamut 4", "ARRI LogC4", "Linear BMD WideGamut Gen5", | ||
"BMDFilm WideGamut Gen5", "CanonLog2 CinemaGamut D55", "CanonLog3 CinemaGamut D55", | ||
"Linear CinemaGamut D55", "Linear V-Gamut", "V-Log V-Gamut", "Linear REDWideGamutRGB", | ||
"Log3G10 REDWideGamutRGB", "Linear Venice S-Gamut3.Cine", "S-Log3 Venice S-Gamut3.Cine", "no_conversion"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env python | ||
# coding:utf-8 | ||
import os | ||
import tempfile | ||
|
||
import meshroom.multiview | ||
from meshroom.core.graph import Graph | ||
from meshroom.core.node import Node | ||
|
||
|
||
def test_formatting_listOfFiles(): | ||
inputImages = ['/non/existing/fileA', '/non/existing/with space/fileB'] | ||
|
||
graph = Graph('') | ||
n1 = graph.addNewNode('CameraInit') | ||
n1.viewpoints.extend([{'path': image} for image in inputImages]) | ||
# viewId, poseId, path, intrinsicId, rigId, subPoseId, metadata | ||
assert n1.viewpoints.getValueStr() == '-1 -1 "/non/existing/fileA" -1 -1 -1 "" -1 -1 "/non/existing/with space/fileB" -1 -1 -1 ""' | ||
|
||
assert n1.allowedCameraModels.getValueStr() == '"pinhole,radial1,radial3,brown,fisheye4,fisheye1,3deanamorphic4,3deradial4,3declassicld"' | ||
|
||
graph = Graph('') | ||
n1 = graph.addNewNode('ImageMatching') | ||
assert n1.featuresFolders.getValueStr() == '' | ||
|
||
n1.featuresFolders.extend("single value with space") | ||
assert n1.featuresFolders.getValueStr() == '"single value with space"' | ||
|
||
n1.featuresFolders.resetValue() | ||
assert n1.featuresFolders.getValueStr() == '' | ||
|
||
n1.featuresFolders.extend(inputImages) | ||
assert n1.featuresFolders.getValueStr() == '"/non/existing/fileA" "/non/existing/with space/fileB"' | ||
|
||
n1._buildCmdVars() # prepare vars for command line creation | ||
# and check some values | ||
name = 'featuresFolders' | ||
assert n1._cmdVars[name + 'Value'] == '/non/existing/fileA /non/existing/with space/fileB' | ||
|
||
|
||
def test_formatting_strings(): | ||
graph = Graph('') | ||
n1 = graph.addNewNode('ImageMatching') | ||
name = 'weights' | ||
assert n1.weights.getValueStr() == '""' # Empty string should generate empty quotes | ||
assert n1._cmdVars[name + 'Value'] == '' | ||
name = 'method' | ||
assert n1.method.getValueStr() == '"SequentialAndVocabularyTree"' | ||
assert n1._cmdVars[name + 'Value'] == 'SequentialAndVocabularyTree' | ||
|
||
n2 = graph.addNewNode('ImageMatching') | ||
n2._buildCmdVars() # prepare vars for command line creation | ||
name = 'featuresFolders' | ||
assert n2._cmdVars[name + 'Value'] == '', 'Empty list should become fully empty' | ||
n2.featuresFolders.extend('') | ||
n2._buildCmdVars() # prepare vars for command line creation | ||
assert n2.featuresFolders.getValueStr() == '""', 'A list with one empty string should generate empty quotes' | ||
assert n2._cmdVars[name + 'Value'] == '', 'The Value is always only the value, so empty here' | ||
n2.featuresFolders.extend('') | ||
n2._buildCmdVars() # prepare vars for command line creation | ||
assert n2.featuresFolders.getValueStr() == '"" ""', 'A list with 2 empty strings should generate quotes' | ||
assert n2._cmdVars[name + 'Value'] == ' ', 'The Value is always only the value, so 2 empty with the space separator in the middle' | ||
|
||
|
||
def test_formatting_groups(): | ||
graph = Graph('') | ||
n3 = graph.addNewNode('ImageProcessing') | ||
n3._buildCmdVars() # prepare vars for command line creation | ||
name = 'sharpenFilter' | ||
assert n3.sharpenFilter.getValueStr() == '"False:3:1.0:0.0"' | ||
assert n3._cmdVars[name + 'Value'] == 'False:3:1.0:0.0', 'The Value is always only the value, so no quotes' | ||
name = 'fillHoles' | ||
assert n3._cmdVars[name + 'Value'] == 'False', 'Booleans' | ||
name = 'noiseFilter' | ||
assert n3.noiseFilter.getValueStr() == '"False:uniform:0.0:1.0:True"' | ||
assert n3._cmdVars[name + 'Value'] == 'False:uniform:0.0:1.0:True' | ||
|