cruxopen / openISP

Image Signal Processor
MIT License
1.09k stars 397 forks source link

Maybe a bug in "hsc.py" & "bcc.py" #5

Closed chayitw closed 3 years ago

chayitw commented 3 years ago

Hi Crux, I meet a issue about "hsc.py":

False Color Suppresion Done...... Traceback (most recent call last): File "isp_pipeline.py", line 308, in yuvimg_hsc = hsc.execute() File "/autohome/user/chayi/workspace/ISP/openISP-master/model/hsc.py", line 35, in execute hsc_img[y,x,0] = self.saturation * (self.hsc_img[y,x,0] - 128) / 256 + 128 AttributeError: 'HSC' object has no attribute 'hsc_img'

Then, i change two lines as below and PASS: hsc_img[y,x,0] = self.saturation (self.hsc_img[y,x,0] - 128) / 256 + 128 hsc_img[y,x,1] = self.saturation (self.hsc_img[y,x,1] - 128) / 256 + 128

As similar as a issue in "bcc.py":

Hue/Saturation Adjustment Done...... Traceback (most recent call last): File "isp_pipeline.py", line 316, in yuvimg_bcc = bcc.execute() File "/autohome/user/chayi/workspace/ISP/openISP-master/model/bcc.py", line 24, in execute bcc_img[y,x] = self.bcc_img[y,x] + (self.bcc_img[y,x] - 127) * self.contrast AttributeError: 'BCC' object has no attribute 'bcc_img'

*Then, i change above line as below and PASS: bcc_img[y,x] = bcc_img[y,x] + (bcc_img[y,x] - 127) self.contrast**

Please reference above and check whether my change is as your wish (want to change). Thanks, have a nice day. -chayi

lianchengyue commented 3 years ago

You say what i want to say, bro

cruxopen commented 3 years ago

Hi Crux, I meet a issue about "hsc.py":

False Color Suppresion Done...... Traceback (most recent call last): File "isp_pipeline.py", line 308, in yuvimg_hsc = hsc.execute() File "/autohome/user/chayi/workspace/ISP/openISP-master/model/hsc.py", line 35, in execute hsc_img[y,x,0] = self.saturation * (self.hsc_img[y,x,0] - 128) / 256 + 128 AttributeError: 'HSC' object has no attribute 'hsc_img'

Then, i change two lines as below and PASS: hsc_img[y,x,0] = self.saturation (self.hsc_img[y,x,0] - 128) / 256 + 128 hsc_img[y,x,1] = self.saturation (self.hsc_img[y,x,1] - 128) / 256 + 128

As similar as a issue in "bcc.py":

Hue/Saturation Adjustment Done...... Traceback (most recent call last): File "isp_pipeline.py", line 316, in yuvimg_bcc = bcc.execute() File "/autohome/user/chayi/workspace/ISP/openISP-master/model/bcc.py", line 24, in execute bcc_img[y,x] = self.bcc_img[y,x] + (self.bcc_img[y,x] - 127) * self.contrast AttributeError: 'BCC' object has no attribute 'bcc_img'

*Then, i change above line as below and PASS: bcc_img[y,x] = bcc_img[y,x] + (bcc_img[y,x] - 127) self.contrast**

Please reference above and check whether my change is as your wish (want to change). Thanks, have a nice day. -chayi

Yes, you are right. I didn't test it... I will fix that on next commit.