Questions tagged [blur]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

PSET 4 filter-more blur returns a weird psychedelic image

So I'm completely stumped. As far as I know, the logic is correct, as when I use debug50 and follow which conditional each pixel we're looking at right now goes through, it goes through what seems to ...
0 votes
1 answer
29 views

pset4 filter-more All functions work when I test it but check50 gives error

I struggled a long time with this problem, and I saw other people had almost the same question and got answers but I didn't get to solve the problem. All four functions seems to work but when I test ...
  • 3
0 votes
1 answer
63 views

CS50 PSET 4 Filter-less, Blur function not filtering 3x3 and 4x4 images correctly

I have read many similar problems on here about the same issue. I believe my function is correct, although redundant and not very stylish. It should however get the job done. I get the same pixels ...
0 votes
1 answer
33 views

PSET4 Blur - Issue understanding what am I doing wrong

I have been stuck on this problem for around 2 weeks, and I have no idea what am I doing wrong... I would like some hint to what I am doing wrong, in which part of code it might be, etc.. My code ...
0 votes
0 answers
74 views

Filter-less blur. Not filtering middle pixel

I'm a bit stuck on filter-less blur, not least because my debug function seems to be broken (but thats anopther story)! Anyway rather than writing the full code for all the pixels I've checked it for ...
  • 1
0 votes
1 answer
80 views

[SOLVED]PSET-4 - Filter - Blur - blur correctly filters pixel in corner

I am getting these 3 errors on check50: blur correctly filters pixel in corner expected "70 85 95\n", not "69 192 95\n" blur correctly filters 3x3 image expected "70 ...
0 votes
1 answer
185 views

Filter less, Blur, why does my code not blur the edge and 3x3 and 4x4 image?

I am stuck at the blur function in filter less. Your task is to calculate the average RGB value of the surrounding pixel in one row and one column of a bmg image, including the middle pixel. It works ...
  • 5
0 votes
1 answer
88 views

Filter blur errors

I'm working on the filter-less problem in pset4. I've got all of my functions to work properly except for the blur function. I am getting the following errors I believe due to problems with how I'm ...
0 votes
0 answers
18 views

YOUR OPINION IS APPRECIATED, pset4, less comfortable, BLUR code, SPOILER

... Fellow Students of CS50, I have finished the problem pset4/filter-less. I would appreciate if more experienced programmers take a look at my code and provide comments, observations, suggestions. I'...
0 votes
0 answers
24 views

pset4, blur, filter-less ...using POINTERS and NULL character

I've been working on blur from PSET4, filter-less for about a week now. I've been trying to filter those pixels with no content by copying the image pixels into a pointers array. Then, I paste NULL ...
0 votes
1 answer
76 views

Trying to complete Blur, need a little help. I've rewritten several times I've tried pointers and variables inside and outside the function

I changed this a few times, I tried to condense it, but now the NULL check gives me an error message // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[...
  • 1
0 votes
2 answers
116 views

Image blurs but check50 fails for filter less. Why?

The image is blurry and everything seems to work fine. But check50 fails. Hence, I am not sure where I made the mistake. // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) {...
0 votes
0 answers
27 views

pset4 blur loop passing but not sure why

I've been working on the blur segment for a while now, trying many different iterations of its code. I finally got it down to where it (kind of) passed with this code with the exception of two checks: ...
0 votes
1 answer
63 views

Filter (more) blur function fails check50

I've hit a bit of a brick wall writing a blur function for filter (more). This is my second go at refactoring the code, and although it produces a blurred image without any issues (no weird edges, ...
  • 103
0 votes
1 answer
26 views

My Red and Blue values are wrong but all my green values are correct. It's pretty simple what i've done. What am I missing ? Please help

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE tmpimage[height][width]; for (int i = 0; i < height ; i++) { for (int j = 0; j < width; j++) ...
0 votes
0 answers
27 views

PSET 4 Blur - How to construct logical flow to average values without many IF statements?

I'm working on the Filter-more Blur problem, and I'm having trouble translating my ideas from paper to code. My first thought was to have many IF statements that would take care of the specific cases (...
1 vote
1 answer
44 views

Pset4 Blur filter (more comfortable) assign new struct to image does not work

I was trying to use the following code to complete the blur function. Everything seems fine but I just couldn't update the RGBTRIPLE variable image directly with another RGBTRIPLE variable I crreated. ...
0 votes
1 answer
72 views

Pset4 Filter (Less) - Invalid operands to binary expression (Int and RGBTRIPLE)

Hello. I'm facing a problem trying to compile this code. I got the error msg Invalid operands to binary expression ('int' and 'RGBTRIPLE') void blur (int height, int width, RGBTRIPLE image[height][...
0 votes
1 answer
119 views

Blur in cs50 problem set 4

My code for the blur filter works fine to edge, corner and middle pixels, but it doesnt work right for a whole 3x3 or 4x4 picture i've been trying everything but nothing seems to fix it. This is what ...
2 votes
1 answer
683 views

Questions regarding pset4 Blur filter (less comfortable)

After tinkering for a while with why my filter didn't work, I finally succeded with the following code: // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { //make copy ...
1 vote
1 answer
1k views

My CS50 PSET4 Filter (Less) Blur function doesn't pass check50 despite seemingly working fine

I've been working on CS50 PSET4 Filter (Less) and finally got a working blur function (or so I thought!) // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE ...
0 votes
1 answer
54 views

style50 weird result

I have a really really long lines for blur function. when I pass it to style50 it asks me to change code style to this: for (int j = 1; j < width - 1 ; j++) { image[i][j].rgbtRed = ...
0 votes
1 answer
20 views

PSET4 LESS BLUR function -Ending Edges problem

My code works fine but for the ending edges not. I mean the right & bottom edges values. Here is my code : void blur(int height, int width, RGBTRIPLE image[height][width]) { // h = 400 w = ...
0 votes
0 answers
69 views

My Filter program is not blurring the image correctly. And it is not able to open the input file. It shows it as NULL

Here is my code: #include"helpers.h" #include<math.h> #include<stdio.h> #include<stdlib.h> // Convert image to grayscale void grayscale(int height, int width, RGBTRIPLE ...
0 votes
1 answer
403 views

PSET4 filter less Blur function

I am stuck in Pset4-Filter/less the Blur function in particular. My problem is the image blurred correctly but does not pass check50. Check50 result : :( blur correctly filters middle pixel >> ...
0 votes
1 answer
121 views

pset4 filter blur less got stuck

i have been working on blur and it works just fine as i run it. but when i run check50 i get this : :( blur correctly filters middle pixel expected "127 140 149\n", not "145 160 169\n&...
0 votes
1 answer
100 views

pset4 filter. Blur image compiles goed but does'nt pass the check50 lots of error

The code in helpers.c all images compiles exept for the Blur image it compiles without any errors. But doesn't pass the cs50 check? any suggestions only the Blur image section. Thanks // Blur ...
  • 57
0 votes
2 answers
43 views

Blur PSet4 (Filter) - Compilation errors passing reference to the image[height][width] array in helper function using pointers

I'm having a brainfart wrapping my head around the use of pointers when trying to pass a reference to the image 2D array in a helper function that I created to assist in the blur effect. Here's blur: ...
  • 1
0 votes
1 answer
101 views

PSET4 Blur not passing Check50

My code seems to work (when visually inspecting output files), but Check50 does not pass it. I'm struggling to understand what is causing this issue despite having repeatedly read over the code and ...
1 vote
2 answers
91 views

Cleaning up PSET4 Blur

I have successfully finished the blur effect on PSET4. Here is a small smattering of the code if(i - 1 >= 0 && j - 1 >= 0) { red += OgImage[i-1][j-1]....
0 votes
1 answer
78 views

Check50 shows errors on Blur Function, Filter even though images are blurred

My blur function seems to be working when I input the sample images and open the output file but check50 shows 4/5 errors :( blur correctly filters middle pixel expected "127 140 149\n", not ...
0 votes
1 answer
70 views

Pset4 Im having issues with the blur filter

Im extremely close to solve this problem, this is the result of check50 :) helpers.c exists :) filter compiles :) grayscale correctly filters single pixel with whole number average :) grayscale ...
1 vote
1 answer
145 views

Blur - I'm so close, but yet not 100%

Apologises for the long post: I wanted to be as explicit in my logic as possible The code I've written uses the following logic to box blur: Use nested for loop to access each pixel in image Check ...
0 votes
1 answer
269 views

Pset4 filter blur corner

I finished the other filters and just the blur filter is giving errors. The errors are the following: :) blur correctly filters pixel on edge :( blur correctly filters pixel in corner expected &...
0 votes
1 answer
287 views

Segmentation fault in blur filter

This is my code for the blur filter in the pset 4. First I used the average for the corner pixels, then I used a loop for the average of the first and last row and columns and then a nested loop for ...
0 votes
1 answer
39 views

PSET4 Filter less BLUR

I want to check if the array exists for the edges so I've been trying to check if the block is NULL. if (image[i-1][j-1] != NULL); { redAverage+=image[i-1][j-1].rgbtRed; ...
0 votes
1 answer
46 views

pset4 Blur calculation does not work properly

for some reason I can't get my calculation for the blur value running. The pictures are really odd and contain crazy colors. Any ideas to why this could be the case? I compared it already to working ...
  • 3
1 vote
1 answer
41 views

My blur function blurs every image, but fails every check50 check - please help!

I'd really appreciate any help that can be offered here. My code seems to output a blurred image perfectly, but fails every check50 check and I can't work out why... void blur(int height, int width, ...
0 votes
1 answer
84 views

Pset 4 filter blur function - only works with corner pixel

requesting help for my blur function. For each pixel, i have split it into 3 for loops. One calculating the row above, same row, and row below. In each loop , if the row is smaller than 0 or equal to ...
0 votes
1 answer
47 views

How to conserve original values in blur function? (pset 4)

Here's my code inside the blur function (in pset 4, Filter-Less): int redSum; int greenSum; int blueSum; int n; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { ...
0 votes
1 answer
129 views

pset4/filter: What is being instantiated with RGBTRIPLE(*image)[width]

I'm struggling to get my head around what is being instantiated here with (*image) (and what to do with it) in this line: RGBTRIPLE(*image)[width] = calloc(height, width * sizeof(RGBTRIPLE)); I ...
  • 101
0 votes
1 answer
56 views

Problem Set 4 Blur --- incorrect output

I am currently working at the blur filter. While the other task were pretty easy, this one ist very much difficult. I have spend hours looking for the mistake - but without success, I tried to do it ...
0 votes
1 answer
51 views

Need help solving blur with c

Code: void blur(int height, int width, RGBTRIPLE image[height][width]) { //temporary image to swap RGBTRIPLE temp_img[height][width]; for (int g = 0; g < height; g++) { for (int h = 0; h < ...
0 votes
1 answer
48 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 ...
  • 3
0 votes
1 answer
137 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
0 answers
48 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
1 answer
85 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
2 answers
67 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 ...
  • 11
1 vote
1 answer
78 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 ...
  • 109
0 votes
1 answer
75 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 ...
  • 7