08-23-2021 07:47 AM
Hello Everyone,
I have attached a picture which is quiet low in quality, I am performing an OCR function on it to extract only the top left value of temperature ( encircled in red ) from it.
I tried to train the OCR through vision assistant but when I try to extract the numbers, unfortunately it shows no extracted value.
Can someone guide me on how to extract the number properly through OCR ?
08-23-2021 08:38 AM
in my experience OCR is always easier in greyscale,
try turn the image into greyscale and increasing the contrast before setting the ROI and doing the OCR.
- although I'd be surprised if you couldn't read the value back over a serial port from the camera using commands (whihc you may find less intensive and doesn't require the Vision license to deploy)
Regards
James
08-23-2021 04:21 PM
via Google's Pytesseract , I can turn this section from your example
via
image_path = r"E:\7_python\lps\2021-08-23_224840_flir\IR_1_crop_grey.png"
img = cv2.imread(image_path)
text = pytesseract.image_to_string(img, config='--psm 12 --oem 3')
x= re.findall(r'\d+\.\d+', text)
print("text extracted\n", text, "\ndecimals regex\n", x)
text extracted
|spo°23.0)
♀
decimals regex
['23.0']
I haven't tried to run this via LabView's Python Node - this could work, but you could also get stuck
As James pointed out, the 23.0 °C value is likely to be accessed in another - more direct - way.
08-24-2021 06:57 AM
yes, pytesseract can be used via python node
I tried to train the OCR through vision assistant but when I try to extract the numbers, unfortunately it shows no extracted value.
for the uncropped, colored image, there's also no output
but for the cropped grayscaled, the temperature value can be extracted
08-25-2021 10:03 AM
Hello james,
Thank you for the tip regading OCR.
Actually, I tried alot to communicate with camera but I could not do so. I am using FLIR T335 camera and when I connect it neither I see it in device manager of the computer nor in NI-MAX. I have contacted FLIR customer service and they told me that ThermoVision Labview Toolkit is discontinued and they cannot support me in connecting the camera to the LabView.
As I want to grab pictures and take the temperature as displayed in the camera screen so I decdied to use OCR instead.
08-25-2021 10:56 AM
@Pukhtun_Yum wrote:
Hello james,
Thank you for the tip regading OCR.
Actually, I tried alot to communicate with camera but I could not do so. I am using FLIR T335 camera and when I connect it neither I see it in device manager of the computer nor in NI-MAX. I have contacted FLIR customer service and they told me that ThermoVision Labview Toolkit is discontinued and they cannot support me in connecting the camera to the LabView.
As I want to grab pictures and take the temperature as displayed in the camera screen so I decdied to use OCR instead.
Stuff the LabVIEW toolkit, I'm sure there's a simple Serial interface defined in the user manual.
you've probably just not got it wired up correctly in H/W yet!
08-26-2021 02:38 AM
There is nothing in manual related to LabView.
I have been stuck in the mud from long now and could not comeup with anything.
08-26-2021 05:07 AM
@Pukhtun_Yum wrote:
Actually, I tried alot to communicate with camera but I could not do so. I am using FLIR T335 camera and when I connect it neither I see it in device manager of the computer nor in NI-MAX.
How do you connect the camera to the computer ?
via USB?
Which OS are you using? Windows 10?
Do you have installed a proper device driver with the right bitness (32 or 64) for the FLIR T335?
e.g. do you have a CD or DVD which came with the manual?
@Pukhtun_Yum wrote:
I have contacted FLIR customer service and they told me that ThermoVision Labview Toolkit is discontinued and they cannot support me in connecting the camera to the LabView.
the toolkit can still be found online at
https://thermovision-labview-toolkit.software.informer.com/download/
I downloaded a .zip file from the link above within a virtual machine, within the zip file is a pdf and a .iso file
the .iso file does contain a lot o stuff which appear to be device driver
but wait - are you sure the FLIR T335 camera was made to be used with the ThermoVision Labview Toolkit?
The Toolkit was discontinued in 2013, Windows 10 was released in 2015...
08-27-2021 03:27 AM
Hello,
I am reading the temperature values from a picture through OCR. I converted the original image to greyscale and increased the contrast of the image to read the numbers properly but when I choose ROI as rectangle then it does not seperate 2 and 9 but consider them as one number.
Is it because the distance between 2 and 9 is very small ?
08-27-2021 03:45 AM
- I am connecting the camera through USB-2
- I am using windows 10
- I contacted FLIR customer service and they gave me drivers
- The FLIR customer service told me that the toolikit is discontinued
- When I connect T335 camera with the computer the following appears (picture attached)