SlideShare a Scribd company logo
1 of 3
Download to read offline
Hello, I was wondering if you can help with the code required of me to do this project. I've been
trying to do this on my own but i've been struggling to get the code working properly on my text
editor or even have an image appear. If you can help with this, that would awesome. I've also
included the docoding code in case you may need it. Thank you and I hope this works out.
Project 2: Matrix Operations and Steganography 1. Goals To use elementary matrix operations to
perform steganography and hide text inside the pixels of an image. 2. Introduction Recall that an
image in a computer memory can be stored as a matrix with each position in the matrix
representing a single pixel of the entire image, and the values of each position corresponding to
the combination of Red, Green, and Blue light that the single pixel will emit. Knowing that an
image is stored as a matrix with values ranging from 0 to 255 we can then apply our knowledge
about linear transformations to these matrices and hide text inside the image. 3. Tasks This
project will not include a walk-through like project 1 did. This project will build on the ideas and
methods from Project 1 , but will require you to devise your own code. Your task is: 1. Obtain a
picture of yourself (for example, the picture from your FSU card which can be obtained by
signing into my.fsu.edu, navigating to "myFSU identity management," and clicking "My
Profile") and convert it into a lossless image format (most likely a png). 2. Use Python3 to open
the picture and create a matrix M consisting of the RGB-saturation (or simply RBG if you prefer,
but not just grayscale) values of the pixels. 3. Create a string consisting of your name and the
answers to the questions in the next section. This string might look like: b"JaredMiller. Yes, this
is bijective because..." It is important to include the ' b ' in front and the quotation marks, as this
tells Python how to convert your text into a number in the next step. 4. Convert the string to a
number by encoding the bytes. To do this in Python3, use the following code (with your own
name and answers to the questions from later on): message =b" JaredMiller. Yes, this is bijective
because..." encoded =" for byte in message: encoded += format (byte, ' 08b ')
Project 1 2 Now encoded represents the number which you should hide in your picture. 5.
Modify your code from project 1 (or modify my decoding code below) to produce a program
which will hide the encoded message from step 4 in the following way: (1) Find the length of
your encoded message encoded (how many 0's and 1's there are) and call this . (2) Find how
many pixels are in your picture and call this p. (3) Let f be defined as the floor of p/, that is, f:=p
(4) Let frequency be defined as the smallest integer power of 2 which is greater than f (so if f is
195 , then frequency is 28=256 ). Note that 20=1, so a frequency of 1 is acceptable if you have a
long message. (5) Number the pixels starting at the top left, from left to right and then top to
bottom just as you read, with the top left pixel being pixel 0 . Let the number of each pixel with
this numbering be its position. That is, position:=rowwidth+column where the first row is row 0
and the first column is column 0 . (6) You will modify every pixel whose position is an integer
multiple of your frequency (including 0 ). The remaining steps only apply to pixels which are to
be modified. (7) For pixels that are to be modified, take the R, G, and B values of the pixel and
determine if their sum is even or odd. (8) Determine if the parity of the sum of R, G, and B
values equals the parity of the next bit of your encoded message (the next 0 or 1 ). If so, do not
modify that pixel. If not, then randomly select (or algorighmically, but do not always select the
same one) one of the RGB values and: (a) if it is even, add 1 to it (b) if it is odd subtract 1 from
it. This will make the parity of the sum of R,G, and B values equal the parity of the next bit of
your encoded message. (9) Update the pixels accordingly. (10) Save your picture and test it with
the code below, which I will use to decode.
Answer the following questions and include them in your message which will be hidden. Make
sure that your answers are not so long that the length of your encoded string exceeds the number
of pixels in your picture. The picture from myFSU is 99000 pixels, so you can store a hidden
message of 99000/8=12,375 characters long (approximately 2000 words). (1) Is the process of
steganography as we have done it an injective mapping between pictures of a given size?
Surjective? What limitations might we have for each? Explain. (2) Without knowing the length
of your message, how might I determine the frequency of the modified pixels? (3) As the RGB-
saturation values essentially encode pixels as vectors in (F255)4 and the matrix has mn pixels,
we know that this matrix represents an element in the vector space (F255)4mn. For a given
picture size, which hidden messages correspond to a mapping in which the image of the space of
all pictures is a vector subspace?
Project 1 5. The program I will use to decode I will use your modified picture with file name
'hidden.png' as the input for the following program in Python 3 . The output of this should be
your intended message from step 3 above, without the leading b or the quotation marks, and with
some nonsense added to the end (if your message doesn't exactly fill the matrix based on your
frequency, which is likely). image - 'hidden.png' # Yust be a png (or other lossless) frequency -
24+6 # May change exponent, to fit message length def unhide(inage, frequency): # Import
module that will bandle opening the inage from PIL import Image # Open the inage in - Inage
.open(image) pixelMap - in. load () # Get the individual pixels ing - Inage , new ( im. node,
in.size) pixelsNen - ing.load() # Empty encoded message (each letter as eight 0s or 1's) encoded
= 111 # Get the size of the image width - img. size [0] height - img. size [1] pixels -
vidth*height # Work over every row for j in range(height): # Work over the columis in that row
for i in range (width): # Get RGB and saturation values of pixel (i,j)a,b,c,dpixelMap[i,j] # If it
is in a position which is to be # used for hiding the message position - j*width+i if
position%frequency =0 : # Grab the added information # (only added to one of R,G, or B) info
=(a+b+c)%2 if info >1 : return "Your data was not compatible or 1+1 "your nessage length is
incorrect" # Add it to the encoded message encoded +- str (info) # Stop editing the picture in.
close() # Split the nessage up based on its sections of eight 0 's or 1's encodedArray - [encoded
[8i:8i+8] for i in range(len(encoded) //8)] # Blank decoded message that we will add to decoded
- II # Convert the binary (the 2 denotes base 2) into letters for letter in encodedarray: decoded +-
chr ( int ( letter, 2)) #print(encoded) return decoded unhide(image, frequency)

More Related Content

Similar to Hello, I was wondering if you can help with the code required of me .pdf

JonathanWestlake_ComputerVision_Project1
JonathanWestlake_ComputerVision_Project1JonathanWestlake_ComputerVision_Project1
JonathanWestlake_ComputerVision_Project1Jonathan Westlake
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlabAnkur Tyagi
 
Data Science - Part XVII - Deep Learning & Image Processing
Data Science - Part XVII - Deep Learning & Image ProcessingData Science - Part XVII - Deep Learning & Image Processing
Data Science - Part XVII - Deep Learning & Image ProcessingDerek Kane
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlabdedik dafiyanto
 
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...IJNSA Journal
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialpotaters
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5najmah17
 
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...CSCJournals
 
Image processing
Image processingImage processing
Image processingmaheshpene
 
We are restricted from importing cv2 numpy stats and other.pdf
We are restricted from importing cv2 numpy stats and other.pdfWe are restricted from importing cv2 numpy stats and other.pdf
We are restricted from importing cv2 numpy stats and other.pdfDARSHANACHARYA13
 
Image steganography techniques
Image steganography techniquesImage steganography techniques
Image steganography techniquesRashmi Tank
 
IRJET- Machine Learning Application for Data Security
IRJET- Machine Learning Application for Data SecurityIRJET- Machine Learning Application for Data Security
IRJET- Machine Learning Application for Data SecurityIRJET Journal
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabminhtaispkt
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep LearningIRJET Journal
 
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...IJITCA Journal
 
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...A Novel Method for Image Watermarking Using Luminance Based Block Selection a...
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...IJERA Editor
 

Similar to Hello, I was wondering if you can help with the code required of me .pdf (20)

JonathanWestlake_ComputerVision_Project1
JonathanWestlake_ComputerVision_Project1JonathanWestlake_ComputerVision_Project1
JonathanWestlake_ComputerVision_Project1
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlab
 
Data Science - Part XVII - Deep Learning & Image Processing
Data Science - Part XVII - Deep Learning & Image ProcessingData Science - Part XVII - Deep Learning & Image Processing
Data Science - Part XVII - Deep Learning & Image Processing
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlab
 
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...
Digital Watermarking through Embedding of Encrypted and Arithmetically Compre...
 
Matlab dip
Matlab dipMatlab dip
Matlab dip
 
Image to Text Converter
Image to Text ConverterImage to Text Converter
Image to Text Converter
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorial
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5
 
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...
An Image Steganography Algorithm Using Huffman and Interpixel Difference Enco...
 
Report_NLNN
Report_NLNNReport_NLNN
Report_NLNN
 
Image processing
Image processingImage processing
Image processing
 
We are restricted from importing cv2 numpy stats and other.pdf
We are restricted from importing cv2 numpy stats and other.pdfWe are restricted from importing cv2 numpy stats and other.pdf
We are restricted from importing cv2 numpy stats and other.pdf
 
Image steganography techniques
Image steganography techniquesImage steganography techniques
Image steganography techniques
 
Image Steganography Techniques
Image Steganography TechniquesImage Steganography Techniques
Image Steganography Techniques
 
IRJET- Machine Learning Application for Data Security
IRJET- Machine Learning Application for Data SecurityIRJET- Machine Learning Application for Data Security
IRJET- Machine Learning Application for Data Security
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep Learning
 
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
Introducing the Concept of Back-Inking as an Efficient Model for Document Ret...
 
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...A Novel Method for Image Watermarking Using Luminance Based Block Selection a...
A Novel Method for Image Watermarking Using Luminance Based Block Selection a...
 

More from aggarwalshoppe14

I am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfI am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfaggarwalshoppe14
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfaggarwalshoppe14
 
I receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfI receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfaggarwalshoppe14
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfaggarwalshoppe14
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfaggarwalshoppe14
 
I need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfI need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfaggarwalshoppe14
 
I need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfI need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfaggarwalshoppe14
 
His Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfHis Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfaggarwalshoppe14
 
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfHIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfaggarwalshoppe14
 
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfHile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfaggarwalshoppe14
 
Hi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfHi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfaggarwalshoppe14
 
Hi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfHi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfaggarwalshoppe14
 
HHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfHHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfaggarwalshoppe14
 
Hello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfHello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfaggarwalshoppe14
 
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfHealth Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfaggarwalshoppe14
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfaggarwalshoppe14
 
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfHere is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfaggarwalshoppe14
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfaggarwalshoppe14
 
help write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfhelp write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfaggarwalshoppe14
 
I need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfI need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfaggarwalshoppe14
 

More from aggarwalshoppe14 (20)

I am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdfI am sure you have heard the adage �my word is my bond�. We do not k.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdf
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdf
 
I receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdfI receive this answer for one of my questions, I need the reference .pdf
I receive this answer for one of my questions, I need the reference .pdf
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdf
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
 
I need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdfI need help with the last 2 methods only in Huffman.java file the me.pdf
I need help with the last 2 methods only in Huffman.java file the me.pdf
 
I need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdfI need help creating this flutter applicationPlease provide a com.pdf
I need help creating this flutter applicationPlease provide a com.pdf
 
His Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdfHis Majesty�s Government report that 20 of officials arrive late fo.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdf
 
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdfHIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
 
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdfHile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
 
Hi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdfHi, I need help with this Probability question. Please show work and.pdf
Hi, I need help with this Probability question. Please show work and.pdf
 
Hi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdfHi could I get the java code for all the tasks pls, many thanks!.pdf
Hi could I get the java code for all the tasks pls, many thanks!.pdf
 
HHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdfHHI analysis indicates that many states have a highly concentrated i.pdf
HHI analysis indicates that many states have a highly concentrated i.pdf
 
Hello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdfHello I need help configuring the regression equation for this scatt.pdf
Hello I need help configuring the regression equation for this scatt.pdf
 
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdfHealth Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
 
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdfHere is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
 
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdfHere is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdf
 
help write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdfhelp write program Project Desoription The purpose of thi project i.pdf
help write program Project Desoription The purpose of thi project i.pdf
 
I need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdfI need a case analysis using Harvards Business School format please.pdf
I need a case analysis using Harvards Business School format please.pdf
 

Recently uploaded

Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Denish Jangid
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Celine George
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdfKamal Acharya
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17Celine George
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIagpharmacy11
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the lifeNitinDeodare
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 

Recently uploaded (20)

Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdf
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 

Hello, I was wondering if you can help with the code required of me .pdf

  • 1. Hello, I was wondering if you can help with the code required of me to do this project. I've been trying to do this on my own but i've been struggling to get the code working properly on my text editor or even have an image appear. If you can help with this, that would awesome. I've also included the docoding code in case you may need it. Thank you and I hope this works out. Project 2: Matrix Operations and Steganography 1. Goals To use elementary matrix operations to perform steganography and hide text inside the pixels of an image. 2. Introduction Recall that an image in a computer memory can be stored as a matrix with each position in the matrix representing a single pixel of the entire image, and the values of each position corresponding to the combination of Red, Green, and Blue light that the single pixel will emit. Knowing that an image is stored as a matrix with values ranging from 0 to 255 we can then apply our knowledge about linear transformations to these matrices and hide text inside the image. 3. Tasks This project will not include a walk-through like project 1 did. This project will build on the ideas and methods from Project 1 , but will require you to devise your own code. Your task is: 1. Obtain a picture of yourself (for example, the picture from your FSU card which can be obtained by signing into my.fsu.edu, navigating to "myFSU identity management," and clicking "My Profile") and convert it into a lossless image format (most likely a png). 2. Use Python3 to open the picture and create a matrix M consisting of the RGB-saturation (or simply RBG if you prefer, but not just grayscale) values of the pixels. 3. Create a string consisting of your name and the answers to the questions in the next section. This string might look like: b"JaredMiller. Yes, this is bijective because..." It is important to include the ' b ' in front and the quotation marks, as this tells Python how to convert your text into a number in the next step. 4. Convert the string to a number by encoding the bytes. To do this in Python3, use the following code (with your own name and answers to the questions from later on): message =b" JaredMiller. Yes, this is bijective because..." encoded =" for byte in message: encoded += format (byte, ' 08b ') Project 1 2 Now encoded represents the number which you should hide in your picture. 5. Modify your code from project 1 (or modify my decoding code below) to produce a program which will hide the encoded message from step 4 in the following way: (1) Find the length of your encoded message encoded (how many 0's and 1's there are) and call this . (2) Find how many pixels are in your picture and call this p. (3) Let f be defined as the floor of p/, that is, f:=p (4) Let frequency be defined as the smallest integer power of 2 which is greater than f (so if f is 195 , then frequency is 28=256 ). Note that 20=1, so a frequency of 1 is acceptable if you have a long message. (5) Number the pixels starting at the top left, from left to right and then top to bottom just as you read, with the top left pixel being pixel 0 . Let the number of each pixel with this numbering be its position. That is, position:=rowwidth+column where the first row is row 0
  • 2. and the first column is column 0 . (6) You will modify every pixel whose position is an integer multiple of your frequency (including 0 ). The remaining steps only apply to pixels which are to be modified. (7) For pixels that are to be modified, take the R, G, and B values of the pixel and determine if their sum is even or odd. (8) Determine if the parity of the sum of R, G, and B values equals the parity of the next bit of your encoded message (the next 0 or 1 ). If so, do not modify that pixel. If not, then randomly select (or algorighmically, but do not always select the same one) one of the RGB values and: (a) if it is even, add 1 to it (b) if it is odd subtract 1 from it. This will make the parity of the sum of R,G, and B values equal the parity of the next bit of your encoded message. (9) Update the pixels accordingly. (10) Save your picture and test it with the code below, which I will use to decode. Answer the following questions and include them in your message which will be hidden. Make sure that your answers are not so long that the length of your encoded string exceeds the number of pixels in your picture. The picture from myFSU is 99000 pixels, so you can store a hidden message of 99000/8=12,375 characters long (approximately 2000 words). (1) Is the process of steganography as we have done it an injective mapping between pictures of a given size? Surjective? What limitations might we have for each? Explain. (2) Without knowing the length of your message, how might I determine the frequency of the modified pixels? (3) As the RGB- saturation values essentially encode pixels as vectors in (F255)4 and the matrix has mn pixels, we know that this matrix represents an element in the vector space (F255)4mn. For a given picture size, which hidden messages correspond to a mapping in which the image of the space of all pictures is a vector subspace? Project 1 5. The program I will use to decode I will use your modified picture with file name 'hidden.png' as the input for the following program in Python 3 . The output of this should be your intended message from step 3 above, without the leading b or the quotation marks, and with some nonsense added to the end (if your message doesn't exactly fill the matrix based on your frequency, which is likely). image - 'hidden.png' # Yust be a png (or other lossless) frequency - 24+6 # May change exponent, to fit message length def unhide(inage, frequency): # Import module that will bandle opening the inage from PIL import Image # Open the inage in - Inage .open(image) pixelMap - in. load () # Get the individual pixels ing - Inage , new ( im. node, in.size) pixelsNen - ing.load() # Empty encoded message (each letter as eight 0s or 1's) encoded = 111 # Get the size of the image width - img. size [0] height - img. size [1] pixels - vidth*height # Work over every row for j in range(height): # Work over the columis in that row for i in range (width): # Get RGB and saturation values of pixel (i,j)a,b,c,dpixelMap[i,j] # If it is in a position which is to be # used for hiding the message position - j*width+i if
  • 3. position%frequency =0 : # Grab the added information # (only added to one of R,G, or B) info =(a+b+c)%2 if info >1 : return "Your data was not compatible or 1+1 "your nessage length is incorrect" # Add it to the encoded message encoded +- str (info) # Stop editing the picture in. close() # Split the nessage up based on its sections of eight 0 's or 1's encodedArray - [encoded [8i:8i+8] for i in range(len(encoded) //8)] # Blank decoded message that we will add to decoded - II # Convert the binary (the 2 denotes base 2) into letters for letter in encodedarray: decoded +- chr ( int ( letter, 2)) #print(encoded) return decoded unhide(image, frequency)