Add .idea to .gitignore.
Rename CapInsetDetector to PatternDetector.