How can i take a noisy image matrix data as a input in neural network

after adding noise to an image , i convereted the image pixel in a matrix then i convert the matrix in 0 and 1 value. now how can i insert this data in neural network for performing percepton AND logic

답변 (1개)

Soumya
Soumya 2025년 6월 23일
The ‘perceptron’ function in MATLAB is used to create a simple single-layer neural network model that performs binary classification. It takes input vectors and learns to produce the correct output based on given target values using supervised learning. By training the ‘perceptron’ with standard AND logic input-output pairs, the model becomes capable of classifying noisy inputs.
Since you have completed the preprocessing steps including adding the noise, you can now follow the below steps to insert the data into a ‘perceptron’ model to simulate AND gate behaviour:
  • As neural network needs input as a column vector, we flatten the image into single column:
input_vector = double(binary_img(:));
  • Define the training data for the AND logic:
P = [0 0 1 1; 0 1 0 1];
T = [0 0 0 1];
  • Create and train the perceptron using MATLAB’s built-in ‘perceptron’ function:
net = perceptron;
net = train(net, P, T); % here, P=input data, T=target data
  • Test the network with binary inputs extracted from the noisy image:
output = net(input_vector);
Please refer to the following documentation to get more information on the ‘perceptron’ function in MATLAB:
I hope this helps!

카테고리

도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2016a

태그

질문:

2022년 1월 2일

답변:

2025년 6월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by