utils: raspberrypi: ctt: Fix pycodestyle W605

W605 invalid escape sequence '\.'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
This commit is contained in:
Laurent Pinchart 2020-05-02 03:32:00 +03:00
parent 6bc4af7d0b
commit e7aa92a883
2 changed files with 4 additions and 4 deletions

View file

@ -42,8 +42,8 @@ def get_col_lux(string):
""" """
Extract colour and lux values from filename Extract colour and lux values from filename
""" """
col = re.search('([0-9]+)[kK](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) col = re.search(r'([0-9]+)[kK](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string)
lux = re.search('([0-9]+)[lL](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) lux = re.search(r'([0-9]+)[lL](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string)
try: try:
col = col.group(1) col = col.group(1)
except AttributeError: except AttributeError:

View file

@ -257,8 +257,8 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot):
plt.scatter(rbs_hat[0], rbs_hat[1], color='red') plt.scatter(rbs_hat[0], rbs_hat[1], color='red')
for i, ct in enumerate(rbs_hat[2]): for i, ct in enumerate(rbs_hat[2]):
plt.annotate(str(ct), (rbs_hat[0][i], rbs_hat[1][i])) plt.annotate(str(ct), (rbs_hat[0][i], rbs_hat[1][i]))
plt.xlabel('$\hat{r}$') plt.xlabel('$\\hat{r}$')
plt.ylabel('$\hat{b}$') plt.ylabel('$\\hat{b}$')
""" """
optional set axes equal to shortest distance so line really does optional set axes equal to shortest distance so line really does
looks perpendicular and everybody is happy looks perpendicular and everybody is happy