Skip to main content

# Tag Info

## Hot answers tagged filter-less

2 votes

### Pset4 (Filter-Less) Reflection: Not getting correct values on Check50

Let's look carefully at this code: for (int j = 0; j < (width / 2); j++) { swap(&image[i][j], &image[i][width - j]); } Now, let's walk through what happens on the first ...
• 69k
2 votes
Accepted

### PSET4 LESS BLUR function -Ending Edges problem 2nd version

Not sure what you changed but the problem code remains exactly the same. It's in these lines (from the original code): for( int i = 0; i <= height ; i++) { for( int j = 0; j <= width ; j++)...
• 69k
2 votes

### PSET4 filter less Blur function

Well, this code definitely blurs the image, but far from correctly. While the "math" may be right (not saying yes or no because I didn't look), there's a more serious logic problem. To blur ...
• 69k
1 vote

### filter-less blur function

i would suggest you trimming your demonstration output down to a single color and making a minimal example of the output we dont need to know every case where you failed.. just a short simple one that ...
• 1,456
1 vote

### Pset4 filter-less reflect function not passing check50

i figured it out, i needed to do width - j -1 for the second embedded for loop
• 21
1 vote
Accepted

### Why does my Reflect function for pset4 filter (less) "correctly filter an image that is its own mirror image" but fail all other checks?

The code is incomplete. It takes a pixel from the left half and copies it to the right half of the image, but it doesn't copy the right half pixel to the left. Say you had a row of 3 pixels, a, b and ...
• 69k
1 vote
Accepted

### filter-less, reflection, segmentation fault, core dumped, PSET4

"I thought by declaring the pointer array int*inter[height][width] I was already allocating all the memory needed." No, this declaration merely created a 2-dimensional array of pointers of ...
• 69k
1 vote
Accepted

### Why is my array code not working in case of pset4, filter's reflect function?

I see a definite problem, a possible problem and some unneeded code. First, the r, g and b arrays are declared inside of the for loop. That means that they're destroyed at the end of every loop pass ...
• 69k
1 vote
Accepted

### Pset4 (Less). Filter sepia. In the output image, the white parts are magenta

Look at the following code: if(SEPIA[k] > 255) { SEPIA[k] = 255; } What is the value of k? Where is it incremented? Is it possible that some code was forgotten ...
• 69k
1 vote
Accepted

### PSet 4 Filter(less) Sepia - Why is my output image slightly red tinted?

Looks like you have assigned incorrect value for rgbtBlue image[i][j].rgbtBlue = sepiaRedCapped;
• 26
1 vote
Accepted

### My helpers doesn't pass check50

This is happening because your loop is summing values from neighbors to the left and up of the current pixel that have already been blurred by previous iterations of the same loop. You need to check ...
• 165
1 vote
Accepted

### PSET4: filter(less) sepia limit to 8 bits

The results are displayed in your question. If the code tries to store a number greater than 8 bits (greater than 255) in a one-byte data type, it generates a runtime overflow error. Nothing will be ...
• 69k

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