Questions tagged [blur]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

Pset4 Filter Less Blur Runtime Error

Below is my Blur function, which does actually work, yet still returns 9 runtime errors all relating to the right hand side of the image (or the width-value edge). I added a couple of printfs to check ...
0
votes
1answer
23 views

CS50 PSET4 (Less) Blur Failed 3x3 & 4x4

This code won't win any style contests, however comma all Check50 test pass except the 3x3 and 4x4. I made a copy of the image, blurred original values, and copied new values to the original image at ...
0
votes
0answers
25 views

Pset4 Filter: Blur Issue

So this is my first time using Stack Exchange, I have been relying on reddit so far for cs50 however I am stuck on blur. Someone on reddit told me I have to "create a temporary container that is ...
0
votes
1answer
27 views

Help on blur function. Correct logic but wont work

So after I passed pset3, I thought things would go easier since my friend said that filter wasn't as complicated as Tideman. Now, I’m doing the blur filter part and stuck on its computation especially ...
0
votes
0answers
25 views

FILTER WORKS FINE, BUT BLUR FAILS 3x3 and 4x4

The code works fine, but it fails blur filters a 3x3 and 4x4 image. I would like a help on why it correctly blur a middle pixel, but fails those two. Apparently, the wrong pixels are either on edge (...
0
votes
1answer
54 views

pset4 filter blur problem

the images is blurry but the check gives errors (it only blurs correctly the edges and corners apparently ...): :( blur correctly filters middle pixel expected "127 140 149\n", not "...
0
votes
1answer
24 views

pset4 filter: blur check50 shows same values, but is returning an error

The blur image seems to be working and according to the error I am seeing, it looks like it is getting the right values, so I thought it might be a rounding error, but I have tried every combination ...
0
votes
0answers
21 views

How do I fix my code for PSET 4 blur?

What I tried to do was go to each pixel and see if any neighboring ones existed. If they did, I saved the neighboring pixel's colors. Then I ran a loop to add up all the values in that specific color ...
0
votes
1answer
38 views

Pset 4 filter - blur almost works but has a few errors and I just can't figure out why

I've tried changing everything I can think of, but I can't figure out why this isn't working. #include "helpers.h" #include <math.h> int cap (int x); RGBTRIPLE rowend (RGBTRIPLE x, ...
0
votes
0answers
26 views

Getting UndefinedBehaviorSanitizer on pset4 filter blur (less comfortable)

I've tried doing this problem a few ways (without success). This time, I wrote the following code: #include "helpers.h" #include <math.h> int cap (int x); RGBTRIPLE corner (RGBTRIPLE ...
0
votes
1answer
18 views

i don't know what is wrong when i run the program the output is all zeros

void blur(int height, int width, RGBTRIPLE image[height][width]) { double red_sum ; double green_sum ; double blue_sum ; double counter; RGBTRIPLE new_image[height][width]; ...
0
votes
1answer
31 views

pset4 filter - blur function only filters image corners

This is my second attempt at this problem, and a full rewrite; I tried once before to be as eloquent as I could, and it was just totally wrong and bizarre. So I just tried to make this one as readable ...
0
votes
1answer
39 views

PSET 4 BLUR and 2 of REFLECT

All of reflect works except reflected a 1 x 2 and a 4 x 4 (3x3 works fine) None of blur works except for when a point is in the corner, which makes little sense. I've sluthed around other answers and ...
0
votes
0answers
12 views

Why does the code output incorrect amounts?

The code is here: https://pastebin.com/gKnVmPFf I've checked that it's not because of neighboring cells, because I am translating them onto a different array. I can't seem to figure out want is wrong. ...
0
votes
1answer
57 views

blur pset4 help please, my code compiles but it does not pass any of the check50 at all

Please help with what i did wrong, i cannot seem to find where my logic was wrong and been staring at it for weeks. I've tried to change my approach a few times but does not seem closer at all and ...
0
votes
0answers
20 views

CS50 filter less Blur problem

I've wrote the code for filter Blur that seems to me have to work. But i don't receive right numbers. Please help me :))) void blur(int height, int width, RGBTRIPLE image[height][width]) { for (int i ...
0
votes
0answers
12 views

The image updates, yet incorrectly

Here is the link to the full code: https://pastebin.com/kFgWhfTR . The image is calculating incorrectly. I have no idea why. I know that it is not caused by one pixel updating the others.
0
votes
0answers
23 views

PSET4:Blur filter doesn't function

I have this code: // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE tempImage[height][width]; int sumR = 0; int sumG = 0; int sumB = 0; ...
0
votes
1answer
53 views

Help with Blur filter! The output image is not blurred, but is returned as a darker image of the input

I have been stuck on this problem for days and have tried so many ways to write this code, but I continuously get errors. Nothing works. The output file is just returned as a darker image of the input ...
0
votes
1answer
62 views

pset4 filters: thinking behind blur

Need some help with blur. I think i'm getting it entirely wrong but i can't seem to understand why. None of the blur assessment are correct at all. Wonder if anyone can give me any tips on getting the ...
0
votes
0answers
30 views

PSET4 Blur Filter, blurs images correctly but check50 fails all blur checks

Not sure what I am doing wrong, I tried casting double to the blurhelper function and check50 still says it is wrong. void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE(*...
0
votes
1answer
30 views

What is wrong with my filter blur?

Been stuck on the blurring part for ages... I've ran out of ideas and motivation to debug at this point after spending an eternity cutting down my spaghetti codes to pappardelle. Any help/hint/...
0
votes
1answer
75 views

pset4 problem with blur, can't find what's wrong

I can't seen to find what is wrong with blur in my code. My code seems fine and it compiles too but the image doesn't get as blurred as it should. I've surfed through almost all the blur related ...
0
votes
0answers
65 views

Pset4: Filter blur problem

I have an error helpers.c:130:27: runtime error: index -1 out of bounds for type 'RGBTRIPLE [width]' helpers.c:130:100: runtime error: index -1 out of bounds for type 'RGBTRIPLE [width]' helpers.c:...
0
votes
0answers
17 views

The blur is not updating when it should be

The suspected incorrect of my code is here: for(int i =0;i<height;i++) { for(int j = 0;j<width;j++) { image[i][j] = copy[i][j]; } } or ...
0
votes
1answer
56 views

pset4 filter blur

I have written the following code for blur . // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { for ( int h=0 ; h<height ; h++) { for ( int w=0 ; ...
0
votes
1answer
100 views

pset4 filter /blur

I have written the following code for blur . // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { for ( int h=0 ; h if(h==0 ) { if(w==...
0
votes
1answer
26 views

CS50 Filter blur

When I tried running this code under Check50, the value returned was completely off for some reason but I can't seem to figure out why. I then reduced the code to only calculating the rgbtBlue value ...
0
votes
1answer
109 views

CS50 PSET4 FILTER BLUR

Got stuck in Blur for more than a week and can´t find out what is wrong. I´ve tried many differents ways, but only corner values matches. Can anyone please give me a help about this. // Blur image ...
0
votes
1answer
46 views

Blur function, doesn't work for 3x3 and 4x4 image

This code works in Check50 for all tests except the 3x3 and 4x4 image. If anyone has any suggestions, I would appreciate it. Thank you! // Blur image void blur(int height, int width, RGBTRIPLE image[...
0
votes
1answer
40 views

Getting partial output in Blur (pset4 filter) , trying to debug edge and middle pixel

My program when run through check50 says the corner pixels work but nothing else seems to work. I have been stuck on this problem for days and after not getting any considerable reply on the cs50 ...
0
votes
1answer
62 views

PSET4 FILTER(LESS) BLUR HELP!

I'm struggling to figure out exactly what's wrong with the code since I think it mathematically checks out and covers every possibility of an image. Please do take a look at my code and maybe you'll ...
0
votes
1answer
87 views

pset 4 reflect & blur work but don't test

My reflect function doesn't seem to do anything to the outputted image and my blur image fails check50 even though the resulting image looks visually blurred. Any insight into why this is the case is ...
0
votes
1answer
45 views

pset4 Filter Issues

So for some reason neither sepia or blur is returning a picture that has been altered at all. I think this has to do with my storing values in a new RGBTRIPLE called newimage and then after all fo ...
0
votes
1answer
26 views

PSET 4 Filter / Blur : I couldn't pass a struct as an function argument what is the reasson?

in order to blur the pixels I created 3 functions. BLUR -Create a new image so old date won't corrupt - iterate over the new image -blur_color - To taking the averages of the color values -...
0
votes
1answer
77 views

pset4 Blur (Filter) not passing check50

following is my code for Blur. It works mathematically when I step through the loops for a given pixel using Tower, Yard, etc. But when running Check50, it fails every test except the corner test. ...
0
votes
1answer
108 views

PSET 4 Filter (less) - Simplification of code for blur

My programme works, it compiles well and it passes the check50 checks. However, I don't like how it looks - I feel it's very cumbersome, too full of logical conditions. I was wondering how I might ...
0
votes
1answer
92 views

PSET4 stuck on blur (filter), image doesn't change

I am currently on the blur part of the filter problem. My code is the following: void blur(int height, int width, RGBTRIPLE image[height][width]) { //Create copy for input RGBTRIPLE ...
0
votes
1answer
152 views

pset4 filter - blur - runtime error, colors off

This is my first post; I hope I get the netiquette right. :-) I've been stuck on pset4 / filters / blur for days. The code compiles. When I run it through check50, these two points are correct: :) ...
0
votes
2answers
207 views

check50 error on helpers.c in pset4

I'm currently working on the filters assignment in pset4 of CS50. My code compiles and runs without issue and produces the results it should on all the stock images. However when I run check50 I get ...
0
votes
1answer
57 views

CS50 pset4, I have problems with getting the blur filter to work

So basically what I did was, first I started off with the row above and then the relevant row and then the row below. I created a for loop which would run across the row 3 times. My code looks like ...
0
votes
2answers
204 views

Rounding Issue with Grayscale and Blur

I seem to be having problems with rounding numbers in these two functions. I am making sure to work with floats and I'm using the round() function so I'm stuck scratching my head at the minute! ...
0
votes
1answer
173 views

CS50 Blur issue

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE holder[height][width]; int red; int green; int blue; float counter; for (int i = 0; i < height; i++) { for (int j ...
0
votes
2answers
200 views

pset4 - Filter - blur error

first post on here so be nice :) I'm working my way through CS50 on edx.org, I've come to pset4 - Filter (less) and have become absolutely stuck. I have programmed the other 3 photo filters with ...
0
votes
2answers
1k views

PSET4 Filter: Blur help

While trying to create an algorithm to come up with the average of the color for all nine pixels (if using 9) I realized I would need a way to see how many surrounding pixels are used in the ...
0
votes
1answer
54 views

Filter Blur Image output is wrong

I'm not sure exactly what is wrong with my code. I don't get any runtime errors and my code compiles, but the image doesn't change at all compared with the original, and check 50 tells me I am out - ...
0
votes
1answer
458 views

CS50 filter issues with greyscale, sepia, and blur

for greyscale I get issues with check50, but the program appears to operate correctly. With sepia and blur, the image outputted is the same as the image inputted. For blur, I would also be curious to ...
0
votes
1answer
93 views

Unusual errors in Blur filter

I am working on the Blur filter in pset4 and I have received some very unusual errors when trying to compile my program. The following is my code for the blur filter. As part of this, I have decided ...
0
votes
1answer
74 views

What can be going wrong in this blur code?

void blur(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { //i0j0 corner top-left ...
0
votes
2answers
125 views

Help with blur filter for pset4! Output image is significantly darker than input

This is the output and input image that my code generates: https://imgur.com/a/mT7YqCD void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE newImage[height][width]; ...