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 ...
3
votes
Accepted
2
votes
Pset4 Whodunit: Any way to enhance the image?
If by enchancing you mean making the colors stronger, you can. What differentiates each of these tones of blue, if you think of the RGBTRIPLE structure? On the "stronger" pixels, the value of blue is ...
2
votes
Accepted
Verdict.bmp: image not clear && no such person seen anywhere in course material
As long as you can recognize a human face in the image, you're fine.
If you don't recognize who the particular face belongs to, recall that in Problem Set 2, after correctly implementing your Caesar ...
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 #...
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 ...
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 ...
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.
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 ...
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 ...
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/...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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?
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 ...
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!
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 ...
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 ...
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 ...
1
vote
Red has been turned to white, now how do I turn blue to black?
Remember that white is represented by ffffff or when red, green, and blue are all 0xff. So when you search for triple.rgbtBlue == 0xff, you will also find all the pixels colored white. That's why ...
1
vote
Red has been turned to white, now how do I turn blue to black?
I'm guessing your error is about comparing a constant to triple.rgbtBlue. Keep in mind that triple.rgbtBlue is just a byte; its values don't range from 0x000000 to 0xff0000, but rather from 0x00 to ...
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible