Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

CONTENT • Bulanık Mantık ve Robotik Uygulamaları

• What is Autofocusing?
CENTER
• How AF system work? • Prof.Dr.Ayşegül Alaybeyoğlu Soy
• Sugeno type FIS in Autofocusing
• Matlab Application • Adem CANDEMİR D220229002
• Rule Base Explanation
What is Autofocusing?
• A camera's autofocus
system intelligently adjusts the
camera lens to obtain focus on
the subject.
• How intelegently?
• By using fuzzy inference system
it control focusing lens position.
What is Autofocusing?
As you know, to be able to use the AF System, you must have an AF motor on the camera body or
on the lens that you used , at least one of them. Also ,this motor is continuous servo motor.

AF Motor on the Lens AF Motor on the Camera Body


AutoFocus System

• Digital cameras have two basic autofocus


systems; Contrast Detection and Phase
Detection. DSLR(Digital Single-Lens Reflex)
cameras use both systems, but use the
Phase Detection system as the primary AF
feature. The only AF system used by the
compact cameras is the Contrast Detection
system.
How AF system work ? Phase Detection

• The simplest explanation of the phase


detection system;
• Two mirror.
• The first one use for two purpose;
• Second mirror just reflecting the image
to AF system part .
How AF system work? Phase Detection
How AF system work? Phase Detection
• In the phase comparison method, the image
drops twice side by side on the sensor for
clarity .
• During the focusing process, the distance
between these two images is measured.
• According to used machine ,the distance
between these two images is exactly known
and it is constant value when the focus will be.
• If the distance between the two images is less
than this constant value, the camera decides
that the focused point is in front of the object
and the focus point should be further.
• If the distance between the two images is
greater than this constant, the camera decides
that the focused point is back of the object
and the focus point should be closer.
How AF system work? Contrast Detection

• Initial movement of lens


• Contrast reducing
• Go back
• Compare with previous one
• Contrast reducing
• Go forward
Objective
Determine the object distance using three distance measures for an automatic camera focusing
system.
Definition of Input/Output Variables
Inputs to the fuzzy inference system are 3 distance measures at left, center, right points in the view- finder.
Outputs are the plausibility values associated with these 3 points. The point with the highest plausibility is
deemed to be the object of interest. Its distance is then forwarded to the automatic focusing system.
• 1. If (left is near) and (center is near) and (right is near) then (plausibilityofleft is low) (plausibilityofcenter is high)
(plausibilityofright is low)
• 2. If (left is near) and (center is near) and (right is medium) then (plausibilityofleft is low) (plausibilityofcenter is medium)
(plausibilityofright is high)
• 3. If (left is near) and (center is near) and (right is far) then (plausibilityofleft is low) (plausibilityofcenter is medium)
(plausibilityofright is low)
• 4. If (left is near) and (center is medium) and (right is near) then (plausibilityofleft is medium)(plausibilityofcenter is
high)(plausibilityofright is medium)
• 5. If (left is near) and (center is medium) and (right is medium) then (plausibilityofleft is medium)(plausibilityofcenter is
high)(plausibilityofright is low)
• 6. If (left is near) and (center is medium) and (right is far) then (plausibilityofleft is medium)(plausibilityofcenter is
high)(plausibilityofright is low)
• 7. If (left is near) and (center is far) and (right is near) then (plausibilityofleft is medium)(plausibilityofcenter is
low)(plausibilityofright is medium)
• 8. If (left is near) and (center is far) and (right is medium) then (plausibilityofleft is medium)(plausibilityofcenter is
low)(plausibilityofright is high)
• 9. If (left is near) and (center is far) and (right is far) then (plausibilityofleft is medium)(plausibilityofcenter is
low)(plausibilityofright is low)
• 10. If (left is medium) and (center is near) and (right is near) then (plausibilityofleft is high)(plausibilityofcenter is
medium)(plausibilityofright is low)
• 11. If (left is medium) and (center is near) and (right is medium) then (plausibilityofleft is high)(plausibilityofcenter is
medium)(plausibilityofright is high)
• 12. If (left is medium) and (center is near) and (right is far) then (plausibilityofleft is high)(plausibilityofcenter is
medium)(plausibilityofright is low)
• 13. If (left is medium) and (center is medium) and (right is near) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is medium)
• 14. If (left is medium) and (center is medium) and (right is medium) then (plausibilityofleft is low)(plausibilityofcenter is
veryhigh)(plausibilityofright is low)
• 15. If (left is medium) and (center is medium) and (right is far) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is low)
• 16. If (left is medium) and (center is far) and (right is near) then (plausibilityofleft is high)(plausibilityofcenter is
low)(plausibilityofright is medium)
• 17. If (left is medium) and (center is far) and (right is medium) then (plausibilityofleft is high)(plausibilityofcenter is
low)(plausibilityofright is high)
• 18. If (left is medium) and (center is far) and (right is far) then (plausibilityofleft is high)(plausibilityofcenter is
low)(plausibilityofright is low)
• 19. If (left is far) and (center is near) and (right is near) then (plausibilityofleft is low)(plausibilityofcenter is
medium)(plausibilityofright is low)
• 20. If (left is far) and (center is near) and (right is medium) then (plausibilityofleft is low)(plausibilityofcenter is
medium)(plausibilityofright is high)
• 21. If (left is far) and (center is near) and (right is far) then (plausibilityofleft is low)(plausibilityofcenter is
medium)(plausibilityofright is low)
• 22. If (left is far) and (center is medium) and (right is near) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is medium)
• 23. If (left is far) and (center is medium) and (right is medium) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is low)
• 24. If (left is far) and (center is medium) and (right is far) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is low)
• 25. If (left is far) and (center is far) and (right is near) then (plausibilityofleft is low)(plausibilityofcenter is
low)(plausibilityofright is medium)
• 26. If (left is far) and (center is far) and (right is medium) then (plausibilityofleft is low)(plausibilityofcenter is
low)(plausibilityofright is high)
• 27. If (left is far) and (center is far) and (right is far) then (plausibilityofleft is low)(plausibilityofcenter is
high)(plausibilityofright is low)
Matlab Application
Matlab Application
inputs outputs
Some Sample Matlab Application
Some Sample Matlab Application
Some Sample Matlab Application
Surface W.r.t the 2 inputs and a Output
Surface W.r.t the 2 inputs and a Output
Surface W.r.t the 2 inputs and a Output
1 input and 1 Output Relations
1 input and 1 Output Relations
1 input and 1 Output Relations

You might also like