Skip to main content
7 votes
Accepted

Pset4 Whodunit: Any way to enhance the image?

I got the same picture! After tweaking, I found that the reason why it's so light and hard to see is because all the coloured pixels are very close to white. What I mean is each pixel has an rgb that ...
Fani H's user avatar
  • 86
3 votes
Accepted

pset4 whodunit question with !==

The comparison operator is != not !==.
curiouskiwi's user avatar
  • 18.7k
2 votes

Pset 4: Whodunit Red to white

I'm not going to spoil the answer for you, but I'll share the line of reasoning that helped me to "get the red out" of the image. Think about this. The hexadecimal RGB representation of black is #...
hotwebmatter's user avatar
  • 3,050
2 votes

Pset4 whodunit yellow background

if( (triple.rgbtBlue=0x00) && (triple.rgbtGreen=0x00)&& (triple.rgbtRed=0xff) ) What is the difference between an assignment operator, = and an equality test operator, ==? What ...
Cliff B's user avatar
  • 69.1k
2 votes
Accepted

pset4 whodunit should it be clear as day?

Yes, what students normally get is a picture like you're describing. You can, if you want, try to improve contrast. It is also possible to recover that pic perfectly in grayscale, but that's a ...
Yuri Laguardia's user avatar
2 votes
Accepted

copy.c of pset4>>whodunit not creating perfect copies

Looks like there are "stray bytes", presumably at the end of clue.bmp. When it's opened in the IDE, clue.bmp is 640W * 480H. The filesize should be 54 + (640 * 3) * 480 which is 921,654 bytes. ls -l ...
DinoCoderSaurus's user avatar
2 votes
Accepted

pset4 WHODUNIT Is there a way to wget the files on the CS50 IDE?

I did that before. The sources for the lab are at https://github.com/cs50/labs/tree/2019/x/whodunit. Make a new directory, open a terminal there, then execute wget https://raw.githubusercontent.com/...
Blauelf's user avatar
  • 21k
2 votes

what's the picture I should see

clue.bmp has changed. From the spec: When submitting this problem, you’ll be asked whodunit! Your result will enable you to answer the question.
DinoCoderSaurus's user avatar
2 votes

Pset4 Whodunit: Any way to enhance the image?

Actually this image can be slightly better enhanced by setting different values for the three color components, I've searched the RGB value of human face (I think this guy is a white guy so I searched ...
user14259's user avatar
1 vote
Accepted

how to answer whodunit questions

Many answers you have to find yourself, in various ways, which is a realistic scenario when you find something new. Some answers can be found on the BMP Wikipedia page linked in the problem ...
Blauelf's user avatar
  • 21k
1 vote
Accepted

Pset4 how does the copy loop work

It doesn't change, nor should it. fread(&triple, sizeof(RGBTRIPLE), 1, inptr); says ... read from the file called inptr, 3 bytes (the size of a pixel) and store it in the variable called triple. ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

I've submitted a problem to gitHub but when I click check50 it says: "There are no results to display"

This may happen if your submission doesn't have the correct 'slug' (ie, you didn't use the exact submit50 command given in the spec) In this case, does your submission Problem title say cs50/2019/x/...
curiouskiwi's user avatar
  • 18.7k
1 vote

PSet3 WhoDunit open ended question materials

All these questions are related to pset3 resize and recover, it is convenient to leave these questions for the end of pset3, when these problems are solved, it is also perfectly legal to look for the ...
MARS's user avatar
  • 5,179
1 vote

Stuck on pset3, Whodunit

I answered many of those questions by looking at the comments in the bmp.h file. Check out line 1 of the code for an answer to the first question.
Daniel Pout's user avatar
1 vote
Accepted

pset4 how does incrementing j help to iterate over pixels?

Both the i and j counters are used to count passes through the loops. They aren't actually used inside the loops, but they don't need to be. Let's start with the inner loop. biWidth is the number of ...
Cliff B's user avatar
  • 69.1k
1 vote

pset4 whodunit can't understand the infile pointer

The notation of the code makes it clear, argv [1] and argv [2] are variables of the pointer type, as the char * infile statement suggests, I do not remember if the theme of the pointers has already ...
MARS's user avatar
  • 5,179
1 vote

Starting whodunit

Start with the clue.c code which copies the image from input to output: Whodunit.c should transform the imput image. Instead of copying each pixel, it should make some modifications. ./whodunit ...
robert_x44's user avatar
1 vote

whodunit message is very blue pale. is it part of the homework to learn to put the blue pale darker ?

You don't have to do anything further, as the purpose of whodunit is simply to learn about file i/o and how you can manipulate bytes in a file. You can, if you'd like, learn more about colors, etc, ...
curiouskiwi's user avatar
  • 18.7k
1 vote

ps4 Whodunit - how to code white colors

A value for Red, Green or Blue can have at most 0xff (255 in decimal), but you are assigning 0xffffff to all of R, G, B. To check if pixel is red you have to check if red value is 0xff and green ...
Vikrant Pradhan's user avatar
1 vote

Resize not resizing - only filling in center of image?

Much of your code is still in "copy" style and has to be adjusted. You need to keep track of state and position in both the input and output file. In many cases the structures are equivalent, but not ...
Blauelf's user avatar
  • 21k
1 vote
Accepted

Did I finish the whodunit problem?

Remember that we are dealing with additive color (so, not like you may traditionally think of colors with paint). If you want red, you would have blue and green both set to 00 and red to FF. Your if ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

How to save images of whodunit into the CS50 IDE

As described in Whodunit -> Distribution -> Downloading, you can download files from the web into the IDE using wget, the example is wget https://github.com/cs50/problems/archive/whodunit.zip which ...
Blauelf's user avatar
  • 21k
1 vote
Accepted

Pset4 Whodunit -- Why does darkening the pale blue add the red back in?

This one will take some thought to fix. ;-) Think about what's happening. The first block of code turns red pixels to white by increasing the value of green and blue, not by altering the red level ...
Cliff B's user avatar
  • 69.1k
1 vote

Which colours do I manipulate in whodunit pset4?

Google "hexadecimal grayscale values" -- w3schools.com will have the best tip of all, if you think about it for a minute. EDIT: Hexadecimal Colors: Shades of Gray It might seem counter-intuitive, ...
hotwebmatter's user avatar
  • 3,050
1 vote
Accepted

Pset4 whodunit I have much enhanced the pic it can be seen easily now, But still cant recognize the person

He appears in various places in the course. Did you happen to decipher the URL that was given at the end of the Caesar problem, for example?
curiouskiwi's user avatar
  • 18.7k
1 vote

Pset4 Whodunit: The person is still unrecognisible

Congratulations on "getting the red out" of the image. Now, if you'd like to view the image in 256 shades of gray instead of in pale cyan, you might want to consider what W3Schools has to say about ...
hotwebmatter's user avatar
  • 3,050
1 vote
Accepted

Pset 4: Whodunit Red to white

It turned out that I needed to change the location of my code. I had to have the fread command before it! Thank anyway for the help!
Iris Frenzy's user avatar
1 vote
Accepted

pset4 - Whodunit. Pale colors

Go look at how color values work. If the shades are light, how might you enhance or change those values to see what they look like? You'll need to read up a bit more on RGB color and changing triple ...
borker's user avatar
  • 301
1 vote

Pset4 whodunit question

Think about what your test is saying: if(triple.rgbtBlue != 0xff && triple.rgbtRed!= 0xff && triple.rgbtGreen != 0xff){ This will be true only if all three triples are not 0xff. If ...
Cliff B's user avatar
  • 69.1k
1 vote

Whodunit TO DOs

I have the same problem. After removing the 0xff red pixels I tried changing all remaining colored (all non-blank) pixels to black but that was definitely worse. Maybe that was going overboard. My ...
atom-box's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible