Pattern recognition method to detect two diseases in rice plants