개정판 d7c47d27
fix
Change-Id: Ida45a5d2cc69296aec0a995ce3ac2f91a5b0cedd
DTI_PID/DTI_PID/TrainingImageListDialog.py | ||
---|---|---|
186 | 186 |
if adata.find(boxName) is not -1: |
187 | 187 |
boxPath = os.path.join(project.getTrainingFilePath(), boxName) |
188 | 188 |
modifiedTime = str( |
189 |
datetime.datetime.strptime(time.ctime(os.path.getmtime(boxPath)), "%a %b %d %H:%M:%S %Y"))
|
|
189 |
datetime.strptime(time.ctime(os.path.getmtime(boxPath)), "%a %b %d %H:%M:%S %Y")) |
|
190 | 190 |
self.ui.tableWidgetList.setItem(row, 2, QTableWidgetItem(modifiedTime)) |
191 | 191 |
|
192 | 192 |
fw = open(boxPath, 'r', encoding='utf8') |
DTI_PID/SPPIDConverter/BaseModel/Document.cs | ||
---|---|---|
128 | 128 |
string sType = item.Element("TYPE").Value; |
129 | 129 |
|
130 | 130 |
DataRow[] rows = ID2SymbolTypeDT.Select(string.Format("Type = '{0}'", sType.Replace("'", "''"))); |
131 |
string sCategory = rows[0]["Category"].ToString();
|
|
131 |
string sCategory = rows.Length != 0 ? rows[0]["Category"].ToString() : "Valves";
|
|
132 | 132 |
|
133 | 133 |
if (sType == "Segment Breaks") |
134 | 134 |
{ |
minorTools/gcloud_test.py | ||
---|---|---|
60 | 60 |
cv2.putText(_image, text.description, (_vertices[0][0] + 30, (_vertices[0][1] - 10)), cv2.FONT_HERSHEY_PLAIN, 1, (100, 100, 100), 1) |
61 | 61 |
''' |
62 | 62 |
|
63 |
cv2.imwrite(path.replace('test', 'test_res'), _image)
|
|
63 |
cv2.imwrite(path.replace('.png', '_res.png'), _image)
|
|
64 | 64 |
|
65 | 65 |
if response.error.message: |
66 | 66 |
raise Exception( |
... | ... | |
72 | 72 |
if __name__ == "__main__": |
73 | 73 |
import os |
74 | 74 |
path = 'E:\Projects\DTIPID\minorTools\gcloud' |
75 |
path = os.path.join(path, 'test2_cad.png')
|
|
75 |
path = os.path.join(path, '02-BFW105. 02-BFW105-C6S-2-Ih_Page1.png')
|
|
76 | 76 |
detect_text(path) |
77 | 77 |
|
내보내기 Unified diff