Skip to content

Commit

Permalink
Update v1.2.1
Browse files Browse the repository at this point in the history
- Added Error Log system.
- Fixed randomized fault injection function issue.
  • Loading branch information
Akerdogmus authored Dec 1, 2021
1 parent 3c96718 commit cdc7332
Show file tree
Hide file tree
Showing 3 changed files with 386 additions and 315 deletions.
5 changes: 3 additions & 2 deletions class_fi_offline_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ def __init__(self, ndir_name, fdir_name, img_name, img_format, camera_type, faul
self.fdir_name = fdir_name
self.img_name = img_name
self.img_format = img_format
self.fault_type = fault_type
self.camera_type = camera_type
self.fault_type = fault_type
self.fault_rate = fault_rate
self.bridge = CvBridge()


def main(self):

if self.camera_type == "TOF":
Expand Down Expand Up @@ -85,6 +84,7 @@ def tof_image_fault(self):
else:
print("This fault cannot be found. Try again...")
exit()

im_arr = aug.augment_image(im_arr)
im = Image.fromarray(im_arr).convert('L')
im = np.array(im)
Expand All @@ -111,6 +111,7 @@ def rgb_image_fault(self):
kernel = np.ones((fr,fr),np.uint8)
try:
im = cv2.imread(self.ndir_name + self.img_name + self.img_format)

if self.fault_type != "nf":
if self.fault_type == "o":
im = self.open_fault(im, kernel)
Expand Down
Loading

0 comments on commit cdc7332

Please sign in to comment.