Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Any method to check Image Tear before saving it to a file ?

Is there any method to check Image tear and then use IMAQ WRITE 2 to save the same image to a file ??

 

I am facing terrible image tears due to cpu idle state and I dont know how to disable those using BIOS.

 

Can some one tell me some way I can detect the tears before saving them ?

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 10
(5,390 Views)

You shouldn't have image tear from a camera. You might want to fix that.

But it is easy to find the tear. Run a kernal on the image horizontal lines (Sobel).

Sum the image on Y and test for high Std in the Y vector.

If you have high Std points you have image tear.

 

Thanks - Amit, 

Amit Shachaf
0 Kudos
Message 2 of 10
(5,378 Views)

What you tried to explain - It really went above my head.

 

Could you please explain how can I create some kernal that checks image tears.

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 3 of 10
(5,363 Views)

Can you post an image with image tear you get?

 

Thanks - Amit

Amit Shachaf
0 Kudos
Message 4 of 10
(5,361 Views)

Please see this post. I tried what people suggested but the problem still persist. So I decided to develop a method to find tears and if they exist dump it and take new image.

 

Image tears

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 5 of 10
(5,359 Views)
Also Amit, When I contacted the camera source people. They said the tears occur due to my CPU entering IDLE states. I also read many online posts where the same problem have been discussed. I tried to check my cpu idle states. But my BIOS doesnt let me change it. So I dont seem to have another option.
Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 6 of 10
(5,355 Views)

Hi Nair,

 

I have looked at your other post of the image tears.

The issue you have with the image is not from CPU idle state to my opinion. It is issue with the company grabbing dll. Best is to return this camera to vendor if you don't have IMAQdx functions for USB 3.0.

I highly recommend that you will switch to using NI drivers for this camera or other camera of your choice. If you need performance it will be best to switch to a camera link base frame grabber and not USB 3.0 camera. USB is very demanding on the CPU resources in compare to frame grabber solution.

 

How to check image tear in software (seen you images):

1. Run edge detector (horizontal sobel kernel) on the image ( IMAQ getKernel (Kernel code #20 for sobel derivative) follow by IMAQ convolute).

2. Sum the image on X and Y with  IMAQ linear average.

3. Test the Y vector for values that above threshold you select. Lines that are next to image tear should have very high values.

 

Thanks - Amit,

Amit Shachaf
0 Kudos
Message 7 of 10
(5,344 Views)

Hello Amit,

 

They promised support in LabView and thats the only reason why we bought it from them. Also, this is USB 2.0 camera. So you say it has nothing to do with CPU idle state, how did you find that out. and how did you find there is problem with their dll.

 

Anyway,

 

I have just a month to graduate and finish my masters thesis. 

 

I rather develop a program to find image tears and see what can be done. Please guide me some links where I can learn about horizontal sobel kernel on the image as you explained. I will try and post any other problem I face. 

 

Thanks a lot Amit.

 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 8 of 10
(5,341 Views)

Hello abikutn,

 

I saw your post and I happen to have an old Sobel example (both horizontal and vertical kernel,  size 3x3 or 5x5).

 

Maybe this could help you, since you are short with time (please see the attached code). The VI uses horizontal and vertical Sobel kernel to calculate the gradient magnitude.

 

Also some links:

 

http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html

 

http://en.wikipedia.org/wiki/Sobel_operator

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 9 of 10
(5,323 Views)

Thank you Klemen. Thank you very much.

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 10 of 10
(5,317 Views)