-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathImageQA.cs
More file actions
173 lines (156 loc) · 9.66 KB
/
ImageQA.cs
File metadata and controls
173 lines (156 loc) · 9.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* Regula Document Reader Web API
*
* Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 8.1.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter;
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
namespace Regula.DocumentReader.WebClient.Model
{
/// <summary>
/// ImageQA
/// </summary>
[DataContract(Name = "ImageQA")]
public partial class ImageQA : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ImageQA" /> class.
/// </summary>
/// <param name="brightnessThreshold">Set the threshold for an actual document brightness below which the check fails.</param>
/// <param name="dpiThreshold">This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail..</param>
/// <param name="angleThreshold">This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail..</param>
/// <param name="focusCheck">This option enables focus check while performing image quality validation..</param>
/// <param name="glaresCheck">This option enables glares check while performing image quality validation..</param>
/// <param name="colornessCheck">This option enables colorness check while performing image quality validation..</param>
/// <param name="moireCheck">This option enables screen capture (moire patterns) check while performing image quality validation..</param>
/// <param name="documentPositionIndent">This parameter specifies the necessary margin. Default 0..</param>
/// <param name="expectedPass">This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process..</param>
/// <param name="glaresCheckParams">glaresCheckParams.</param>
public ImageQA(double brightnessThreshold = default(double), int dpiThreshold = default(int), int angleThreshold = default(int), bool focusCheck = default(bool), bool glaresCheck = default(bool), bool colornessCheck = default(bool), bool moireCheck = default(bool), int documentPositionIndent = default(int), List<InputImageQualityChecks> expectedPass = default(List<InputImageQualityChecks>), GlaresCheckParams glaresCheckParams = default(GlaresCheckParams))
{
this.BrightnessThreshold = brightnessThreshold;
this.DpiThreshold = dpiThreshold;
this.AngleThreshold = angleThreshold;
this.FocusCheck = focusCheck;
this.GlaresCheck = glaresCheck;
this.ColornessCheck = colornessCheck;
this.MoireCheck = moireCheck;
this.DocumentPositionIndent = documentPositionIndent;
this.ExpectedPass = expectedPass;
this.GlaresCheckParams = glaresCheckParams;
}
/// <summary>
/// Set the threshold for an actual document brightness below which the check fails
/// </summary>
/// <value>Set the threshold for an actual document brightness below which the check fails</value>
[DataMember(Name = "brightnessThreshold", EmitDefaultValue = false)]
public double? BrightnessThreshold { get; set; }
/// <summary>
/// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail.
/// </summary>
/// <value>This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail.</value>
[DataMember(Name = "dpiThreshold", EmitDefaultValue = false)]
public int? DpiThreshold { get; set; }
/// <summary>
/// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail.
/// </summary>
/// <value>This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail.</value>
[DataMember(Name = "angleThreshold", EmitDefaultValue = false)]
public int? AngleThreshold { get; set; }
/// <summary>
/// This option enables focus check while performing image quality validation.
/// </summary>
/// <value>This option enables focus check while performing image quality validation.</value>
[DataMember(Name = "focusCheck", EmitDefaultValue = false)]
public bool? FocusCheck { get; set; }
/// <summary>
/// This option enables glares check while performing image quality validation.
/// </summary>
/// <value>This option enables glares check while performing image quality validation.</value>
[DataMember(Name = "glaresCheck", EmitDefaultValue = false)]
public bool? GlaresCheck { get; set; }
/// <summary>
/// This option enables colorness check while performing image quality validation.
/// </summary>
/// <value>This option enables colorness check while performing image quality validation.</value>
[DataMember(Name = "colornessCheck", EmitDefaultValue = false)]
public bool? ColornessCheck { get; set; }
/// <summary>
/// This option enables screen capture (moire patterns) check while performing image quality validation.
/// </summary>
/// <value>This option enables screen capture (moire patterns) check while performing image quality validation.</value>
[DataMember(Name = "moireCheck", EmitDefaultValue = false)]
public bool? MoireCheck { get; set; }
/// <summary>
/// This parameter specifies the necessary margin. Default 0.
/// </summary>
/// <value>This parameter specifies the necessary margin. Default 0.</value>
[DataMember(Name = "documentPositionIndent", EmitDefaultValue = false)]
public int? DocumentPositionIndent { get; set; }
/// <summary>
/// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process.
/// </summary>
/// <value>This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process.</value>
[DataMember(Name = "expectedPass", EmitDefaultValue = false)]
public List<InputImageQualityChecks>? ExpectedPass { get; set; }
/// <summary>
/// Gets or Sets GlaresCheckParams
/// </summary>
[DataMember(Name = "glaresCheckParams", EmitDefaultValue = false)]
public GlaresCheckParams? GlaresCheckParams { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class ImageQA {\n");
sb.Append(" BrightnessThreshold: ").Append(BrightnessThreshold).Append("\n");
sb.Append(" DpiThreshold: ").Append(DpiThreshold).Append("\n");
sb.Append(" AngleThreshold: ").Append(AngleThreshold).Append("\n");
sb.Append(" FocusCheck: ").Append(FocusCheck).Append("\n");
sb.Append(" GlaresCheck: ").Append(GlaresCheck).Append("\n");
sb.Append(" ColornessCheck: ").Append(ColornessCheck).Append("\n");
sb.Append(" MoireCheck: ").Append(MoireCheck).Append("\n");
sb.Append(" DocumentPositionIndent: ").Append(DocumentPositionIndent).Append("\n");
sb.Append(" ExpectedPass: ").Append(ExpectedPass).Append("\n");
sb.Append(" GlaresCheckParams: ").Append(GlaresCheckParams).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}