Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
CS50 PSET4 (Less) Blur Failed 3x3 & 4x4
It's notable that all the bad pixels seem to be located on the upper limits of width and height.
Let's look at one of them:
if ( i == 0 && j == width)
Note the limit on j. Wouldn't setting j = width …
1
vote
Accepted
pset4 filter /blur
Look at the test conditions. Here's an example.
else if (0<h<height-1)
That form is fine in python but not in C. It needs to look like
else if (0 < h && h < height - 1)
Not sure this is the only …
0
votes
Trying to complete Blur, need a little help. I've rewritten several times I've tried pointer...
I took a quick look at it and one thing jumped out at me. The limits for checking right and bottom sides have a problem. They're going off the edge of the array.
Let's take one of them. You should …
1
vote
PSET4 Blur - Issue understanding what am I doing wrong
The code is using the temp array to add the values of the surrounding pixels to blur the current pixels. This is a problem. Open and read the bmp.h file and look at the declaration of RGBTRIPLE. … Use that total to calculate the blur value, make sure it is 255 or less, and then store it in the temp array. …
0
votes
Accepted
Pset 4 - filter (less comfortable) Blur function
Actually, it's only filtering the first row correctly. It took me a bit to find the root cause.
First of all, it would have been a better practice to initialize the copy array to all zeros to start. …
0
votes
Accepted
pset4 filter: blur check50 shows same values, but is returning an error
If you click on the link in the check50 results, you can see more detailed results. Check50 is showing that the two tests, 3x3 and 4x4, are failing.
If you look at the detailed results, you will see t …
0
votes
Accepted
Pset4 Filter Less Blur Runtime Error
Let's look at one case, line 130. The rest will follow.
if ((w < width) && (h < height)) // edge case 5: S E
{
// record bottom right
aveRed += image[h + 1][w + …
1
vote
Accepted
Pset 4 Blur Filter Program Seems to Compile but Doesn't Output Anything and Check50 Reads Er...
For starters, the loops never run. That's why the output looks like the original image. Look at the test conditions in the for loop:
for (int i = 0; i < height && i > 0; i++)
{
for (int j = 0; j …
2
votes
Accepted
CS50 Pset4 Blur
The code is calculating the blur values (correctly, I assume), but then it is storing the result back in the original image array immediately. …
0
votes
Accepted
I don't understand the error message I'm getting
The errors are the same issue. The 3rd parameter that the pixels() function takes is an array of RGBTRIPLEs. The problem is that the array that the code is trying to pass is declared as an array of …
0
votes
Accepted
PSET4 Filter less BLUR
wouldn't it be easier to check if i-1, j-1, i+1 or j+1 are within acceptable limits?
0
votes
pset4 Filter Issues
Not so in blur, but you knew that.
The blur logic is broken. The way it's written, it won't use any values other than 0 and 1 for image array indexes. Perhaps you meant to use [i+k][j+l]???? …
1
vote
Accepted
pset4 filter blur less got stuck
To calculate the blur for any pixel, the code needs to use the original values from all the surrounding pixels. … This code is calculating blur and putting the calculated blur values back into the same image array. …
4
votes
Accepted
pset4 Blur (Filter) not passing check50
The way to get the values for the blur is to average the values from the surrounding pixels in the original image. So, what happens when you're updating the original image as you go??? …
1
vote
Accepted
Filter (more) blur function fails check50
Yes, it produces a blurred picture, just not correctly blurred. You should work with something simple, like a 3x3 bitmap and look at the actual input and output values to see what it does. Specificall …