1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Matlab images pixels invert

  1. Sep 27, 2009 #1
    1. The problem statement, all variables and given/known data

    1.invert all pixel of a 20x20 window around I(X,Y)
    2.set all pixel aroud the in the inverted images

    2. Relevant equations
    cant make work right way.
    Please help me to solve problem.

    3. The attempt at a solution
    I=imread('test7.jpg'); % Load the image file and store it as the variable I.
    x1=floor(rand*240+8);% generate random varible x1
    y1=floor(rand*240+8);% generate random varible y1
    for i=y1-7:y1+7
    for j=x1-7:x1+7 % Show15x15 With (x,y) in the center
    imshow(B); % show the modified image
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted