Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e7568d2

Browse files
Logistic map is applied
1 parent 665019d commit e7568d2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎encryption.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,24 @@ using namespace std;
77
int main()
88
{
99
Mat image;
10+
double x[102];
11+
double u; //u is the control parameter for chaotic map,also known as population rate
12+
1013
image = imread( "Image.jpg", 1 );
1114
if ( !image.data )
1215
{
1316
printf("No image data \n");
1417
return -1;
1518
}
19+
//Applying Logistic map
20+
u=3.94; //It is the condition for logistic map
21+
x[0]=0.4; //Base condition for logistic map
22+
for (int i = 1; i <= 100; ++i)
23+
x[i]=u*x[i-1]*(1-x[i-1]);
24+
25+
for (int i = 0; i<=100; ++i)
26+
cout<<x[i]<<" ";
27+
1628
namedWindow("Shubham@shaurya", WINDOW_AUTOSIZE );
1729
imshow("Shubham@shaurya", image);
1830
waitKey(0);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /