07-05-2013 07:54 PM
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 ?
07-07-2013 01:43 PM
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,
07-08-2013 12:14 PM
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.
07-08-2013 01:56 PM
Can you post an image with image tear you get?
Thanks - Amit
07-08-2013 02:29 PM
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.
07-08-2013 02:44 PM
07-08-2013 05:11 PM
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,
07-08-2013 05:48 PM
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.
07-09-2013 07:16 AM
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
07-09-2013 11:46 AM
Thank you Klemen. Thank you very much.