Questions tagged [blur]

The tag has no usage guidance.

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

Pset 4 Filter(less) Blur

I'm having an issue with the counter variable of my code. I wrote a printf to see if it returns 4, 6, or 9. Which is what it should do, if my IF conditions are correct. Unfortunately it does not ...
0
votes
1answer
14 views

I don't understand the error message I'm getting

I don't understand the error message, and i've been trying to modify the code to fix the error but it still appears. // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
0answers
29 views

Problem with filter (pset 4): Blur and edge

All the filters on the filter program work well, but check50 is giving me a few errors, which I think, is due to rounding issues. But, I have checked and re-checked the code for those errors, and ...
0
votes
0answers
13 views

PSET4 Filter Blur by 4 nested for loops

I am trying to implement my idea on Blur function. My main assumption is to get this done using nested 4 for loops as follow: void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
1
vote
2answers
20 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
1
vote
1answer
21 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
0
votes
0answers
22 views

My blur function doesn't pass check50

so I modified the code from last time, and it seems that instead of making copies of the image and calculating on them, takes the first if statement and makes it the new image so all the other values ...
0
votes
0answers
15 views

Pset4 - filter Blur

I wrote following code for blur filter . But I can't get the positive result . I want to know what the mistake is . void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
1answer
49 views

CS50 Pset4 Blur

Greatings fellow Humans So I am about at my wit's end with this one. I have set it all out and have the maths (I beleive) correct on the averages. BUT... check 50 says that some of the averages are ...
0
votes
1answer
43 views

My helpers doesn't pass check50

my helpers doesn't pass check50 and I don't know why. This is the code: #include "helpers.h" #include <math.h> // Convert image to grayscale void grayscale(int height, int width, ...
0
votes
1answer
37 views

Pset4 filter problem: blur problem Runtime Error

I'm working on a solution to Pset4 blur and have hit a roadblock. My aim is to create average RGB values from a 3x3 grid surrounding and including current pixel and change pixel in original image to ...
0
votes
1answer
23 views

Pset4 Blur filter, loop for searching surrounding pixels

I'm trying to write the part of the code where the surrounding pixels around the main pixel are searched in order to make the average and later replace the main value for the average value. I am ...
2
votes
1answer
46 views

pset4 - filter program,can't figure out what exactly is the problem with blur!

Can't figure out what the problem with this code is. It seems to be working correctly for corners, but for nothing else. Please help! void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
0answers
17 views

Trouble with Blurring my Image Pset4… Running out of Bounds

I am trying to blur my image but I am running into trouble. First of all, the issue is that I run out of bounds - because I did not account for edges and corners here. Is there a simple fix - like ...
0
votes
1answer
31 views

cs50 pset4 blur function index out of bounds issue

I am working on the cs50 pset4 blur function, but I seem to be getting runtime error index out of bounds for the top and bottom pixels. Here is the code: // Blur image void blur(int height, int width, ...
0
votes
1answer
34 views

Pset 4 Blur Filter Program Seems to Compile but Doesn't Output Anything and Check50 Reads Errors

I am having trouble with the blur function. I am not given any error messages when I run the program, and it creates an output image as if the blurring is working. However, when I open the output ...
0
votes
1answer
42 views

pset4 filter/blur code problem

I have written code for the blur filter in problem set 4. The code compiles and runs fine and seems to blur the image but when I run check50 it says that the RGB values aren't correct. I have looked ...
1
vote
1answer
35 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
40 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
41 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
51 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
56 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
152 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
32 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
25 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
55 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
55 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
20 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
62 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
50 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
14 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
76 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
24 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
13 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
32 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
71 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
83 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
33 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
37 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
142 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
86 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
70 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
148 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
28 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
185 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
57 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
46 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
76 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
104 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 ...