A cognitive image processing implementation for pattern-matching execution is proposed in this paper. It is based on the learning process of the human vision as an edge-enhancing filter for medical images. We set up an experiment to test its impact on the performance of decision-making algorithm working on brain magnetic resonance data. The execution times of similar filters can become unpractical on real 3-D or higher dimensional data, if implemented on a CPU. An innovative and high-performance embedded system for real-time pattern matching was developed. The design uses field-programmable gate arrays and the powerful associative memory chip (an ASIC) to achieve real-time performance and requires a training phase and a data acquisition phase. It is a very compact implementation that improves execution time $\times 1000$ for the training phase and $\times 100$ for the data acquisition phase for 2-D black and white images compared to a last generation i7 CPU. The implementation of this edge-enhancing filter is expected to positively impact on medical devices for real-time diagnosis (e.g., diagnostic ultrasound) and for image processing steps in medical image analysis where computing power is a limiting factor.